How do I browse and reuse my previous search patterns in Vim?
q/
How it works Vim keeps a history of all your search patterns.
q/
How it works Vim keeps a history of all your search patterns.
gD
How it works Vim provides two built-in commands for jumping to where an identifier is defined, without needing tags or an LSP: gd (lowercase) searches backward
:changes
How it works Vim maintains a change list that records the position of every change you make to a buffer.
:jumps
How it works Vim keeps a jump list that records your cursor position every time you make a jump.
( and )
How it works Vim defines a sentence as text ending with .
zj and zk
How it works When working with folded code in Vim, you often want to skip from one fold to another without unfolding anything.
<C-f> to scroll forward, <C-b> to scroll backward
How it works Vim provides two commands for scrolling by an entire screen (page) at a time: Ctrl-F (Forward) scrolls the view one full page down through the file
W, B, and E
How it works Vim distinguishes between two types of word objects: A word (lowercase w, b, e) is a sequence of letters, digits, and underscores, or a sequence of
v%
How it works The % motion jumps to the matching bracket, parenthesis, or brace.
:set winfixwidth winfixheight
How it works When you open new split windows in Vim, the existing windows automatically resize to make room.
M to move to the middle, L to move to the bottom
How it works Vim offers three commands to jump the cursor to specific vertical positions on the visible screen without scrolling: H moves to the top of the scre
:%bd | e#
How it works Vim does not have a built-in single command to close all buffers except the current one, but you can achieve this with a two-part command: :%bd e#.
<C-w>}
How it works The } command opens a preview window showing the tag definition of the word under your cursor.
:tab sb N
How it works The :tab sb N command opens buffer number N in a brand new tab page.
<C-w>f
How it works You may already know that gf opens the file path under the cursor in the current window.
v, V, or Ctrl-V while in visual mode
How it works Vim has three visual modes, and you can switch between them without losing your current selection: v - Characterwise visual mode (select individual
<C-w>x
How it works The x command exchanges the current window with the next one.
:b N
How it works Every buffer in Vim is assigned a unique number when it is opened.
:CocInstall coc-tsserver
coc.
<C-w>h / <C-w>j / <C-w>k / <C-w>l
How it works Vim lets you navigate between split windows using followed by a direction key.