How do I fix broken or incorrect syntax highlighting in Vim?
:syntax sync fromstart
Vim's syntax highlighting engine does not always parse the entire file from the beginning — it uses sync points to determine where to start parsing for the vi
2277 results for "@a"
:syntax sync fromstart
Vim's syntax highlighting engine does not always parse the entire file from the beginning — it uses sync points to determine where to start parsing for the vi
:Explore
Netrw is Vim's built-in file explorer plugin that comes with every Vim installation.
:ls
The :ls command displays a list of all open buffers in Vim, showing their buffer number, status indicators, file name, and the line the cursor was last on.
:set foldopen
The foldopen option lets you specify exactly which cursor movements and commands will automatically open a closed fold.
:put =execute('{cmd}')
The :put =execute('{cmd}') idiom inserts the output of any Vim Ex command as text in your buffer.
registers #registers #ex-commands #command-line #normal-mode
<C-o> / <C-i>
Vim maintains a jumplist — a history of every "jump" you make (searches, marks, gg, G, %, etc.
ii / ai
The vim-indent-object plugin by Michael Smith adds text objects based on indentation level, giving you ii (inner indent) and ai (an indent) to select, delete, c
:undolist
Vim's undo history is a tree, not a linear stack.
:GitGutterToggle
vim-gitgutter is a plugin that shows git diff markers in the sign column (the narrow column to the left of line numbers).
:set scrolljump=5
When scrolloff is 0 and the cursor moves just past the screen boundary, Vim scrolls by exactly one line, which can feel abrupt during rapid navigation.
vim-which-key plugin
vim-which-key displays a popup showing available key bindings as you type a prefix key.
:set statusline=%f\ %y\ [%l/%L]
Vim's statusline option lets you build a custom status bar from format items.
/\V<C-r><C-r>"
When your yanked text includes regex symbols like .
g8
Pressing g8 in normal mode displays the UTF-8 encoding of the character under the cursor as a sequence of hex bytes.
:sball
The :sball command (short for split all) opens every loaded buffer in its own horizontal split window in one shot.
]' and ['
The ]' and [' motions let you traverse every lowercase mark set in the current buffer without needing to remember which registers you used.
:%TOhtml
Vim ships with a built-in plugin that converts the current buffer into a standalone HTML file, complete with your exact syntax highlighting colors.
"/p
Vim stores the last search pattern in the search register "/.
qq;.q then @q or @@
The dot command (.
<C-x><C-]>
Pressing in insert mode opens a completion menu populated from your project's tags file.