Tutorial by Examples

map Overview A key sequence can be re-mapped to another key sequence using one of the map variants. As an example, the following typical map will exit Insert mode when you press jk in quick sequence: :inoremap jk <Esc> map Operator There are multiple variants of :map for different modes...
The leader key could be used as a way to create a mapping with a key-binding that can be overridden by the end user. The leader is the \ key by default. In order to override it, the end-user would have to execute :let g:mapleader='somekey(s)' before defining the mapping. In a typical scenario, the...
In most text editors, the standard shortcut for saving the current document is Ctrl+S (or Cmd+S on macOS). Vim doesn't have this feature by default but this can be mapped to make things easier. Adding the following lines in .vimrc file will do the job. nnoremap <c-s> :w<CR> inoremap &...

Page 1 of 1