]> arthur.barton.de Git - ax-zsh.git/commitdiff
10_keyboard: Add "\C-x1" shortcut to move the cursor after the command
authorAlexander Barton <alex@barton.de>
Sun, 12 Mar 2017 17:47:48 +0000 (18:47 +0100)
committerAlexander Barton <alex@barton.de>
Sun, 12 Mar 2017 17:47:48 +0000 (18:47 +0100)
core/10_keyboard/10_keyboard.zshrc

index adff3c1be01ca83df4d0a8edbf5c3e59cf3caf03..0e529de127aaa7d78edb80928e8ab22ceb1a1b0d 100644 (file)
@@ -11,3 +11,11 @@ bindkey "\e[3~" delete-char
 autoload -Uz edit-command-line
 zle -N edit-command-line
 bindkey '\C-x\C-e' edit-command-line
+
+# Move to where the arguments belong.
+after-first-word() {
+       zle beginning-of-line
+       zle forward-word
+}
+zle -N after-first-word
+bindkey "\C-x1" after-first-word