How do I set the leader key for custom mappings?
let mapleader = " "
The leader key is a prefix for custom mappings.
2125 results for "i{ a{"
let mapleader = " "
The leader key is a prefix for custom mappings.
:vimgrep /pattern/ **/*.py
By specifying a file glob pattern with :vimgrep, you can restrict the search to specific file types.
:lua vim.diagnostic.config({virtual_text = false})
Neovim's built-in diagnostic system (vim.
dip
The dip command deletes the inner paragraph — all contiguous non-blank lines surrounding the cursor.
vim.wo.number = true / vim.bo.tabstop = 2
Neovim's Lua API exposes three namespaces for setting options with the correct scope: vim.
:tags
The :tags command displays the tag stack, showing all the tag jumps you have made with and their return points.
M
The M command moves the cursor to the line in the middle of the current window.
:diffthis in both windows
The :diffthis command enables diff mode for the current buffer.
vim-gitgutter plugin
vim-gitgutter shows git diff markers in the sign column next to line numbers.
<C-k>{char1}{char2}
Vim has a built-in digraph system that lets you insert hundreds of special characters by typing two-character mnemonics.
editing #editing #insert-mode #special-characters #unicode #productivity
v / V / <C-v> (while in visual mode)
When you are already in visual mode and realize you need a different selection type, you do not have to exit and re-enter.
autocmd FileType python setlocal ...
Using autocmd FileType with setlocal, you can configure settings that only apply when editing files of a specific type.
Plug 'vim-airline/vim-airline'
vim-airline provides a beautiful, feature-rich status line that shows file info, git branch, diagnostics, and more with minimal configuration.
y$
The y$ command yanks (copies) text from the cursor position to the end of the line.
:highlight Group ctermfg=color
The :highlight command changes the appearance of a highlight group.
autocmd FileType {lang} setlocal {options}
Vim's autocmd FileType lets you apply settings that only take effect when editing a specific file type.
:set formatoptions
The formatoptions setting is a string of single-character flags that governs Vim's automatic text formatting: when lines wrap, whether comment syntax continues
%
The % command jumps to the matching bracket, parenthesis, or brace.
:lnext and :lprev
The location list is a per-window alternative to the quickfix list.
`< and `>
The ` ` marks automatically track the boundaries of the last visual selection.