Files
willfullyobtuse.com/vi-everywhere.org

37 lines
871 B
Org Mode

:PROPERTIES:
#+SETUPFILE: setup.org
#+keywords: vim
#+subtitle:
:END:
** vi modal editing in most places
For my sake, I prefer to have Vim bindings in as many places as
possible.
Most shells can be configured to use Vim bindings by putting =set -o vi=
somewhere in your shell startup script.
If you're using ZSH then you'll probably want an additional binding to
restore CTRL-R reverse history search.
=bindkey '^R' history-incremental-search-backward=
For CLI tools that use the =readline= library then you can configure its
input mode using a =.inputrc= file in your =$HOME= directory.
This affects REPLs like =ghci= and tools like =psql=.
#+begin_src txt
set editing-mode vi
$if mode=vi
set keymap vi-command
# these are for vi-command mode
Control-l: clear-screen
set keymap vi-insert
# these are for vi-insert mode
Control-l: clear-screen
$endif
#+end_src