vimtricks.wiki Concise Vim tricks, one at a time.

How do you create a custom key mapping in Vim?

Answer

nnoremap <leader>s :w<CR>

Explanation

Use nnoremap for non-recursive normal mode mappings. <leader>s triggers :w<CR> to save. Always use noremap variants to avoid mapping conflicts.

Next

How do I visually select a double-quoted string including the quotes themselves?