How do I search case-insensitively in Vim without changing global settings?
/\cpattern
How it works By default, Vim searches are case-sensitive: /Hello will not match hello or HELLO.
/\cpattern
How it works By default, Vim searches are case-sensitive: /Hello will not match hello or HELLO.
:jumps
How it works Vim keeps a jump list that records your cursor position every time you make a jump.
qa0f=20i <Esc>20|C= <Esc>lDjq
How it works Aligning text on a delimiter such as = without plugins requires a clever macro technique.
( and )
How it works Vim defines a sentence as text ending with .
qa{edits}@bq
How it works Vim macros can call other macros, creating a modular system of reusable building blocks.
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
qama{edits}'aq
How it works When a macro needs to jump to different parts of the file and then return to a starting position, marks are the perfect tool.
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
:nnoremap <buffer> <leader>r :!python %<CR>
How it works By adding to a mapping command, the mapping only applies to the current buffer.
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
qabi"<Esc>ea"<Esc>wq
How it works This macro wraps the current word in double quotes and moves to the next word, making it easy to repeat across a line or file.
do (diffget) / dp (diffput)
How it works When you open two files in diff mode (using vim -d file1 file2 or :windo diffthis), Vim highlights the differences between them.
qa0f:dwj0q
How it works When recording a macro that you plan to repeat across multiple lines, the key technique is to end the macro positioned on the next line, ready for
<C-w>}
How it works The } command opens a preview window showing the tag definition of the word under your cursor.
qaq
How it works To clear a macro register, you simply start recording into that register and immediately stop.
<C-w>f
How it works You may already know that gf opens the file path under the cursor in the current window.
<C-w>x
How it works The x command exchanges the current window with the next one.
<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.
@@
How it works After running a macro with @a (or any other register), you can repeat that same macro by pressing @@.