How do I enable spell checking in Vim?
:set spell
The :set spell command activates Vim's built-in spell checker, which highlights misspelled words directly in your buffer.
:set spell
The :set spell command activates Vim's built-in spell checker, which highlights misspelled words directly in your buffer.
:syntax on
The :syntax on command enables syntax highlighting in Vim, colorizing your code based on the file type.
<C-w>=
The = (Ctrl+w then =) command resizes all open split windows so they have equal width and height.
:g/pattern/normal dd
The :g/pattern/normal {commands} command executes normal mode keystrokes on every line in the file that matches the given pattern.
f{char}
The f{char} command moves the cursor forward to the next occurrence of {char} on the current line.
t{char}
The t{char} command moves the cursor forward to the character just before the next occurrence of {char} on the current line.
:g/pattern/command
The :g/pattern/command (global) command executes an Ex command on every line in the file that matches the given pattern.
gg
The gg command moves the cursor to the first line of the file.
G
The G command moves the cursor to the last line of the file.
42G
The 42G command jumps the cursor directly to line 42 in the current file.
g<C-a>
The g command increments numbers across a visual selection so that each subsequent line gets a progressively higher value.
:noh
The :noh (short for :nohlsearch) command clears the highlighting from the last search pattern.
:only
The :only command closes every window in the current tab page except the one your cursor is in.
<C-w>c
The c (Ctrl+w then c) command closes the current window without closing the buffer it contains.
:%s/pattern//gn
The :%s/pattern//gn command counts how many times a pattern appears in the file without making any changes.
daw
The daw command deletes a word including one side of its surrounding whitespace.
:g/^$/d
The :g/^$/d command deletes every blank line in the file using Vim's powerful global command.
dd
The dd command deletes the entire current line, regardless of where the cursor is positioned on that line.
dit
The dit command deletes the text inside the nearest enclosing HTML or XML tag pair without removing the tags themselves.
D
The D command deletes everything from the cursor position to the end of the current line.