Vim
Probably the most needed shortcut key for those who only use Vim when it pops up in Git, how to exit Vim editor?
Shift + : (command mode)
q
Modes
Command
Command mode is the default mode.
Edit
Edit mode is activated by entering a append or i insert.
Exit enter mode using the Esc key.
Configuration
The vmap
and imap
settings are for copy to and paste from the system clipboard. This set guifont
string is for linux. The string is slightly different for the same font in OS X and Windows. To get the font string for your system, set the font using the menu, e.g., edit > select font. Then in command mode Esc, enter :set guifont?
. Note that spaces need to be escaped with a backslash.
.vimrc
colorscheme koehler
set guifont=Fira\ Code\ weight=453\ 10
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-v> c<ESC>"+p
imap <C-v> <ESC>"+pa
Here is the OS X configuration. Note that the Ctrl key modifier has been changed from C
to D
mapping the ⌘ command key instead.
colorscheme koehler
set guifont=Fira\ Code\ Retina:h11
vmap <D-c> "+yi
vmap <D-x> "+c
vmap <D-v> c<ESC>"+p
imap <D-v> <ESC>"+pa