Skip to content

Commit

Permalink
consolidate key mappings for linux as it is similar to windows
Browse files Browse the repository at this point in the history
  • Loading branch information
synle committed Jul 29, 2023
1 parent c1e1fe7 commit e24273e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 533 deletions.
1 change: 1 addition & 0 deletions software/scripts/sublime-text-keybindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ async function doInit() {

WINDOWS_ONLY_KEY_BINDINGS = parseJsonWithComments(await fetchUrlAsString('software/scripts/sublime-text-keybindings.windows.json')) || [];
LINUX_ONLY_KEYBINDING = parseJsonWithComments(await fetchUrlAsString('software/scripts/sublime-text-keybindings.linux.json')) || [];
LINUX_ONLY_KEYBINDING = [...LINUX_ONLY_KEYBINDING, ...WINDOWS_ONLY_KEY_BINDINGS];
MAC_ONLY_KEY_BINDINGS = parseJsonWithComments(await fetchUrlAsString('software/scripts/sublime-text-keybindings.mac.json')) || [];

// begin COMMON_KEY_BINDINGS
Expand Down
260 changes: 1 addition & 259 deletions software/scripts/sublime-text-keybindings.linux.json
Original file line number Diff line number Diff line change
@@ -1,259 +1 @@
[
{
"key": "alt+r",
"command": "show_overlay",
"args": {
"overlay": "goto",
"text": "@"
}
},
{
"key": "alt+p",
"command": "show_overlay",
"args": {
"overlay": "goto",
"show_files": true
}
},
{
"key": "alt+shift+p",
"command": "show_overlay",
"args": {
"overlay": "command_palette"
}
},
{
"key": "alt+ctrl+p",
"command": "prompt_select_workspace"
},
{
"key": "alt+shift+g",
"command": "find_prev"
},
{
"key": "alt+g",
"command": "find_next"
},
{
"key": "ctrl+up",
"command": "move",
"args": {
"by": "pages",
"forward": false
}
},
{
"key": "ctrl+down",
"command": "move",
"args": {
"by": "pages",
"forward": true
}
},
{
"key": "alt+shift+l",
"command": "split_selection_into_lines"
},
{
"key": "alt+shift+[",
"command": "prev_view"
},
{
"key": "alt+shift+]",
"command": "next_view"
},
{
"key": "alt+shift+a",
"command": "alignment"
},
{
"key": "alt+x",
"command": "cut"
},
{
"key": "alt+c",
"command": "copy"
},
{
"key": "alt+v",
"command": "paste"
},
{
"key": "alt+a",
"command": "select_all"
},
{
"key": "alt+z",
"command": "undo"
},
{
"key": "alt+s",
"command": "save"
},
{
"key": "alt+shift+s",
"command": "prompt_save_as"
},
{
"key": "alt+backspace",
"command": "left_delete"
},
{
"key": "alt+=",
"command": "increase_font_size"
},
{
"key": "alt+keypad_plus",
"command": "increase_font_size"
},
{
"key": "alt+-",
"command": "decrease_font_size"
},
{
"key": "alt+keypad_minus",
"command": "decrease_font_size"
},
{
"key": "alt+d",
"command": "find_under_expand"
},
{
"key": "alt+shift+n",
"command": "new_window"
},
{
"key": "alt+n",
"command": "new_file"
},
{
"key": "alt+w",
"command": "close"
},
{
"key": "alt+y",
"command": "redo_or_repeat"
},
{
"key": "alt+up",
"command": "move",
"args": {
"by": "pages",
"forward": false
}
},
{
"key": "alt+down",
"command": "move",
"args": {
"by": "pages",
"forward": true
}
},
{
"key": "alt+left",
"command": "move_to",
"args": {
"to": "bol",
"extend": false
}
},
{
"key": "alt+right",
"command": "move_to",
"args": {
"to": "eol",
"extend": false
}
},
{
"key": "shift+alt+left",
"command": "move_to",
"args": {
"to": "bol",
"extend": true
}
},
{
"key": "shift+alt+right",
"command": "move_to",
"args": {
"to": "eol",
"extend": true
}
},
{
"key": "ctrl+alt+left",
"command": "move_to",
"args": {
"to": "bof",
"extend": false
}
},
{
"key": "ctrl+alt+right",
"command": "move_to",
"args": {
"to": "eof",
"extend": false
}
},
{
"key": "ctrl+alt+up",
"command": "move_to",
"args": {
"to": "bof",
"extend": false
}
},
{
"key": "ctrl+alt+down",
"command": "move_to",
"args": {
"to": "eof",
"extend": false
}
},
{
"key": "ctrl+alt+shift+up",
"command": "move_to",
"args": {
"to": "bof",
"extend": true
}
},
{
"key": "ctrl+alt+shift+down",
"command": "move_to",
"args": {
"to": "eof",
"extend": true
}
},
{
"key": "shift+alt+up",
"command": "move",
"args": {
"by": "pages",
"forward": false,
"extend": true
}
},
{
"key": "shift+alt+down",
"command": "move",
"args": {
"by": "pages",
"forward": true,
"extend": true
}
},
{
"key": "alt+/",
"command": "toggle_comment",
"args": {
"block": false
}
},
{ "key": "shift+alt+z", "command": "redo_or_repeat" }
]
[]
6 changes: 5 additions & 1 deletion software/scripts/vs-code-keybindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ async function doWork() {
// write to build file
writeToBuildFile([
['vs-code-keybindings-windows', _formatKey([...COMMON_KEY_BINDINGS, ...WINDOWS_ONLY_KEY_BINDINGS], WINDOWS_OS_KEY), true],
['vs-code-keybindings-linux', _formatKey([...COMMON_KEY_BINDINGS, ...LINUX_ONLY_KEYBINDING], LINUX_OS_KEY), true],
[
'vs-code-keybindings-linux',
_formatKey([...COMMON_KEY_BINDINGS, ...WINDOWS_ONLY_KEY_BINDINGS, ...LINUX_ONLY_KEYBINDING], LINUX_OS_KEY),
true,
],
['vs-code-keybindings-macosx', _formatKey([...COMMON_KEY_BINDINGS, ...MAC_ONLY_KEY_BINDINGS], MAC_OSX_KEY), true],
]);

Expand Down
Loading

0 comments on commit e24273e

Please sign in to comment.