How do I set the leader key for custom mappings?
let mapleader = " "
The leader key is a prefix for custom mappings.
488 results for ":e!"
let mapleader = " "
The leader key is a prefix for custom mappings.
vim.diagnostic.count()
vim.
:cnoremap <C-a> <Home>
Vim's command line has limited navigation by default.
:s/pattern/\U&/g
Vim's :substitute command supports case-transformation escape sequences in the replacement string.
search #search #substitute #ex-commands #editing #text-objects
:set wildmode=list:longest,full
Vim's default Tab completion in the command-line cycles through matches one at a time, making it hard to see all available options at once.
:s/\(\w\+\)/\u\1/g
Vim's substitute command supports case-change modifiers in the replacement string that let you capitalize, uppercase, or lowercase matched text as part of the s
:cnoremap %% <C-r>=expand('%:h').'/'<CR>
By mapping %% in command-line mode, you can type %% wherever you would normally type a path and have Vim automatically expand it to the directory of the current
:keeppatterns {command}
The :keeppatterns modifier runs an Ex command — typically :s, :g, or :v — without modifying @/ (the last search pattern) or the command history.
command-line #ex-commands #search #substitution #command-line #scripting
:sp +/{pattern} {file}
The +{cmd} syntax lets you run an Ex command immediately after a file is opened.
g8
Pressing g8 in normal mode displays the UTF-8 encoding of the character under the cursor as a sequence of hex bytes.
:set autochdir
The autochdir option tells Vim to automatically change the current working directory to the directory of the file in the active window whenever you switch buffe
:%s/pattern/\U&/g
Vim's substitute replacement string supports special case-transform atoms that change the case of matched text without requiring a second pass or an external to
:set wildignore
:set wildignore defines a comma-separated list of glob patterns that Vim excludes from wildcard expansion and file completion.
vim.diagnostic.goto_next()
Neovim's built-in vim.
ea
The ea compound shortcut moves to the last character of the current word with e, then enters insert mode after the cursor with a.
<C-k>{two-chars}
Vim's digraph system lets you type hundreds of special characters — arrows, fractions, accented letters, currency symbols, and more — using intuitive two-ch
:%s/\s\+$//
The :%s/\s\+$// command removes trailing whitespace (spaces and tabs) from every line in the file.
:lua vim.diagnostic.goto_next({severity = vim.diagnostic.severity.ERROR})
Neovim's built-in diagnostic system (vim.
When recording a macro, you can execute another macro inside it by pressing @b (or any register) during the recording.
U
In visual mode, pressing U converts all selected characters to uppercase and u converts them to lowercase.