- Added VS Code wordwise fix for xkeysnail

This commit is contained in:
Ben Reaves
2020-04-24 20:04:35 -05:00
parent a66c82d84c
commit 696fb6ad7f
3 changed files with 40 additions and 1 deletions

View File

@@ -51,6 +51,24 @@ define_conditional_modmap(re.compile("Gnome-terminal|konsole|io.elementary.termi
# Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac # Key.RIGHT_CTRL: Key.LEFT_CTRL, # Mac
}) })
# Keybindings for VS Code
define_keymap(re.compile("Code"),{
K("C-g"): pass_through_key, # cancel Go to Line...
K("Super-g"): K("C-g"), # Go to Line...
K("F3"): pass_through_key, # cancel Find next
K("C-h"): pass_through_key, # cancel replace
K("C-M-f"): K("C-h"), # replace
K("C-Shift-h"): pass_through_key, # cancel replace_next
K("C-M-e"): K("C-Shift-h"), # replace_next
K("f3"): pass_through_key, # cancel find_next
K("C-g"): K("f3"), # find_next
K("Shift-f3"): pass_through_key, # cancel find_prev
K("C-Shift-g"): K("Shift-f3"), # find_prev
K("Super-C-g"): K("C-f2"), # Sublime - find_all_under
K("Super-Shift-up"): K("M-Shift-up"), # multi-cursor up
K("Super-Shift-down"): K("M-Shift-down"), # multi-cursor down
}, "Code")
# Keybindings for Sublime Text # Keybindings for Sublime Text
define_keymap(re.compile("Sublime_text"),{ define_keymap(re.compile("Sublime_text"),{
K("C-Super-up"): K("M-o"), # Switch file K("C-Super-up"): K("M-o"), # Switch file

View File

@@ -0,0 +1,21 @@
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "alt+left",
"command": "-workbench.action.terminal.focusPreviousPane",
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "-workbench.action.terminal.focusNextPane",
"when": "terminalFocus"
},
{
"key": "alt+right",
"command": "cursorWordRight"
},
{
"key": "alt+left",
"command": "cursorWordLeft"
}
]

View File

@@ -62,7 +62,7 @@ if [[ $1 == "1" || $1 == "2" || $1 == "3" || $1 == "winmac" || $1 == "mac" || $1
sudo pip3 install --upgrade . sudo pip3 install --upgrade .
sudo systemctl enable xkeysnail sudo systemctl enable xkeysnail
sudo systemctl daemon-reload sudo systemctl daemon-reload
sudo systemctl start xkeysnail sudo systemctl restart xkeysnail
echo "Adding xhost fix..." echo "Adding xhost fix..."