Here’s the list of couple places that I enable vi mode.
Bash shell
set -o viI always enable bash movement mode in my.bashrcfile. With it set, I can switch between normal mode and edit mode by pressingESC. Editing works as any normal shell, but when switching to normal mode, I can usevimovement keys likej, k, h, l, w, b, e, $, ^, editing current line is also faster by using selectors such ascw, dw, C, D.... One important note is that we are usingvimode, notvim, so selectors likeciw, caw, ci(does not work.export EDITOR=vim, yes, another.bashrcconfiguration. This allow me to open up a quick vim buffer with current line. So I can do a lot more withvimto make sure my long command is correct. I don’t use this as often becausevimode is already good enough. But in some cases like editing a longcurlcommand with multiple headers andjsonpayload, using vim is much better. While in command line, press^XE(^ is ctrl key) to open editor. If you don’t setEDITORenvironment, default editor such asnanowill be used.The
vimitself. I used to enjoyvimbut I found writingvimscriptis hard. Andneovimis easier version ofvimto use. I’m avoiding to sayneovimis better, because I believe they’re both doing their best. I just findneovima bit easier to use (maybe skill issue).Leetcode
vim mode. You can change Leetcode editor key binding by opening editor settings > Code editor > Key binding > Vim. It work perfectly and you don’t have to:wto save your code. But if your muscle memory still does so, no problems. The down side ofvim modeon Leetcode is you cannot copy the code to clipboard. Any time I need to copy code to run debug locally, I have to switch back to Standard mode to copy then paste to my localvim. 😢 Hope they can change it in the future.Terminal emulator. I use
kittyterminal emulator. It uses GPU for rendering, displays images, animations in terminal, pdf as well. So I can quickly view many documents without leaving my beloved terminal. It is super customizable, so I usevikeys to move between split windows. I map custom keys in~/.config/kitty/kitty.conflike so:map super+k neighboring_window up map super+j neighboring_window down map super+h neighboring_window left map super+l neighboring_window rightipythonipython --TerminalInteractiveShell.editing_mode=viBrowser. Sadly, no, I don’t use any
viorvimkey binding plugins in browser. I used to, but I found it can break the modern JavaScript frameworks in different ways. Especially on input fields.