Updates

While in 2013 I switched my Zsh to Vim mode by default, I never could fully grap its immense power, so I moved to Fish in 2016.

If you are interested in Vim mode in Zsh, I recommend you check out ZVM. I have not tried it, but it seems like the better implementation.

Since I've switched to Vim and made it my default editor by adding EDITOR="/usr/bin/vim" into my /etc/rc.conf, my shell (the great Z Shell) has started to misbehave.

After scratching my head and going really annoyed with why Ctrl+a didn't bring me to the beginning of the line and Ctrl+e to the end of it, but all hell broke loose and then the "delete" and "insert" keys started to change the case of the characters under the cursor and so on, I went to the #zsh channel on irc.freenode.net and asked.

Sure enough pretty soon someone told me that by changing the default text editor Zsh changes its default mode. So what was rendering my usage troublesome was that since I switched to Vim, Zsh switched to 'Vi' mode with the appropriate Vi-like bindings. The solution is simple – just adding bindkey -e to your ~/.zshrc switches the Zsh bindings back to the 'Emacs' mode.

Although I really like the separate modes in Vi(m) as the editor, in a shell I find it quite annoying. Maybe when (if) I become a Vim and Zsh master, it will make sense …until then I'm using Vim for editing and Zsh in 'Emacs' mode.

hook out → drinking the perfectly brewed cup of Darjeeling Himalaya FTGFOP and digging himself in his law books


Related Posts


Published

Category

Tehne

Tags