Caps LockFor us, it is basically redundant, and the position on the keyboard is unreasonable. When we accidentally pressCaps LockAnd then an error occurs.ESCThe most frequently used button in vim.Caps LockReplaceESCIt's really good, and you don't have to worry about pressing<ESC>When the press to the damn<F1>.
Someone may ask, isn't it inconvenient for consecutive capital statements? We can use lower-case letters first, select the text in the section, and press u to convert it to upper-case letters. Do you thinkCaps LockIs it redundant?
Replacement method:
xmodmap -e 'clear Lock' -e 'keycode 0x42 = Escape'
According to the author's test, after the computer restarts,Caps LockAgain, this is not what we expected, but it is also good to think about it carefully. If we use other people's computers, it is always hard to put others'sCaps LockChangeESCBut it is always possible to change it for the moment. In this case, the above statement is not suitable. But there is still a problem that needs to be solved. We cannot manually execute this statement every time we enable it on our computer. The answer is also clear, let Linux Execute this statement every time it is started.
Add the preceding statement to the end of. profile. On your own computerCaps LockChangeESCIt does not matter, the specific method please refer to: http://c2.com/cgi/wiki? Remapcapslock
Here is another tips for uppercase in VIM:
"change word to uppercase, I love this very muchinoremap <C-u> <esc>gUiwea
The preceding statement is stored in the. vimrc file, and its function is to pressCTRL + uIn upper case.
References:
Http://stackoverflow.com/questions/2176532/how-to-map-caps-lock-key-in-vim
Https://bitbucket.org/sjl/dotfiles/src/tip/vim/.vimrc