From a8fe7e42af0d4ed5f2f0b517c65f52a83248b7ef Mon Sep 17 00:00:00 2001 From: "Kenneth Benzie (Benie)" Date: Fri, 1 Dec 2017 16:57:24 +0000 Subject: [PATCH] Remove incorrect vi bindings --- README.md | 13 ++++++------- zshrc | 9 ++++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 3b4fc19..8c0f400 100644 --- a/README.md +++ b/README.md @@ -86,13 +86,11 @@ starting point but was replaced as it uses some strange defaults. #### `vicmd` Mode -Whole line operations for yank, change, and delete are enabled mode with `Y`, -`C`, and `D` respectively. Undo and repo and enabled using `u` and `U`. Showing -help for the command under the cursor with `h` is replaced with `K`. The -[Vim][vim] "Ex" mode binding `:` is disabled mode since is barely of use and -easy to enter accidentally. Bindings for `k` and `j` integrate with -[zsh-history-substring-search][search] performing up and down searches -respectively. +Undo and repo and enabled using `u` and `U`. Showing help for the command under +the cursor with `h` is replaced with `K`. The [Vim][vim] "Ex" mode binding +`:` is disabled mode since is barely of use and easy to enter accidentally. +Bindings for `k` and `j` integrate with [zsh-history-substring-search][search] +performing up and down searches respectively. #### Edit Command Line @@ -129,3 +127,4 @@ Various aliases are defined at the end of [zshrc](zshrc) for convenience. [syntax]: https://github.com/zsh-users/zsh-syntax-highlighting [search]: https://github.com/zsh-users/zsh-history-substring-search [vim-mode]: https://github.com/sharat87/zsh-vim-mode +[vim]: http://www.vim.org/ diff --git a/zshrc b/zshrc index 2ca7044..8701ab7 100644 --- a/zshrc +++ b/zshrc @@ -38,15 +38,18 @@ prompt fresh # Enable vi mode line editor keymap bindkey -v -# Enable yank, change, and delete whole line with 'Y', 'C', and 'D' +# Enable yank, change, and delete whole line with 'Y', 'cc', and 'dd' bindkey -M vicmd 'Y' vi-yank-whole-line -bindkey -M vicmd 'C' vi-change-whole-line -bindkey -M vicmd 'D' kill-whole-line # Enable undo with 'u' and redo with 'U' bindkey -M vicmd 'u' undo bindkey -M vicmd 'U' redo +# Enable toggle comment at start of line al la vim-commentary +bindkey -M vicmd 'gcc' vi-pound-insert + +# TODO: vi-pipe??? + # Enable substring history search with 'j' and 'k' bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'j' history-substring-search-down