How does which-key help discover key mappings?
require('which-key').setup()
which-key.
require('which-key').setup()
which-key.
:verbose map <key> or :verbose set option?
The :verbose prefix shows where a mapping, setting, command, or function was defined — which file and line number.
command-line #command-line #debugging #config #mappings #workflow
let mapleader = ' ' then nnoremap <leader>key command
The leader key is a configurable prefix for your custom key mappings.
:let @q then use in nnoremap
Macros are stored in registers as plain keystroke strings.
onoremap ih :<C-u>execute "normal! ?^==\+$\r:noh\rkvg_"<CR>
Vim lets you define custom text objects using operator-pending mode mappings (onoremap) and visual mode mappings (vnoremap).
:m+1 / :m-2
The :m (move) command relocates lines to a new position in the file without using registers.
editing #editing #ex-commands #lines #productivity #mappings
:nnoremap / :inoremap / :vnoremap
Vim has two types of key mappings: recursive (:map, :nmap, :imap) and non-recursive (:noremap, :nnoremap, :inoremap).