If you are using vim a lot, and touch type, you may find reaching up to press escape all the time ruins your typing.
You can rebind escape to caps lock, and vice versa, throughout all your X apps using
Use this in
clear Lock keycode 9 = Caps_Lock keycode 0x42 = Escape
And then use the command, probably in your
xmodmap ~/.Xmodmap to do the rebind.
set -o vi and you can press escape (or whatever you’d bound that to) to use the vim commands on the current commanded typed in on the command line.
You can also press
v and it will open up vim and you can edit the command in the full vim editor.
You made need to put
EDITOR=vim in your
If you start typing in vim, then press
ctl n, vim will give you a list of autocomplete options.
In this list you can press
ctl n and
ctl p to navigate the list.
However, by default, vim won’t show you any autocomplete options with a dash in them.
For instance, if you have the text
this-is-a-variable. And you start typing
t, and then press
ctl n, it will only show you
To make the autocomplete list include items that have a dash in them, add to the
When you press tab in vim, you normally get a tab character inserted in your text.
You can turn this off via
set expandtab. When you press tab now, you get spaces.
To alter how many spaces you get on tab press, issue
Finally, to alter how to spaces you get when you indent text with
I’ll probably use
nvim now since we can remotely control it with python or what have you.
However, there are annoyances in moving over (I’m on 0.1.3).
set listdoesn’t show the eol character.
You can avoid all this by putting this in yout
set ruler set laststatus=0 set mouse=v set listchars=tab:-\ ,trail:-,nbsp:+,eol:$
In addition, in gnu screen or tmux, the escape key is harder to press. You can put
maptimeout 10 in your .screenrc to fix in this gnu screen. It’s something to do with nvim using a new library for user input, I believe.
Anyway, we’re on 0.1.3, so thing will change.