Techniques
/
All techniques47
The search index could not be loaded.
No matching techniques
- g; or g,Retrace your edits NavigationReturn to places you edited: g; goes back through edits, and g, goes forward again.
- giResume where you stopped typing NavigationReturn to the last Insert-mode stopping point and start inserting there.
- gvRecover the previous selection NavigationRe-enter Visual mode with the previous selection’s area and mode.
- /old<CR>N cgnnew<Esc> .Turn a search into a repeatable edit Repeat & scaleUse cgn to change a search match, then repeat that match change with dot.
- "_diwDelete without losing your yank Vim memorySend a deletion to the black hole register instead of replacing useful register contents.
- "0pPaste register 0 after deleting Vim memoryPaste from register 0 after deleting.
- <C-r>0Insert a register without leaving Insert mode Vim memoryInsert from register 0 directly while typing.
- <C-r>=6*7<CR>Calculate into your text Vim memoryEvaluate a Vim expression and insert its result.
- <C-o>0Make one Normal-mode detour EditingRun one Normal-mode command, then return to Insert mode.
- 5<C-a> or 5<C-x>Adjust a number with a count EditingAdd or subtract a count from the first number at or after the cursor on the current line.
- V2j g<C-a>Number repeated lines in one gesture EditingVisual g Ctrl-a applies progressively larger increments across selected lines.
- :%normal! I# Run Normal commands across lines Repeat & scaleApply a Normal-mode edit to every line in a range.
- :g/^DEBUG/d _Remove every matching line Repeat & scaleRun a deletion only on lines matching a pattern.
- :v/ERROR/d _Keep only the lines you need Repeat & scaleInvert :global to operate on lines that do not match.
- :2t$Copy lines without a register EditingDuplicate a line directly to a destination address.
- :3m0Move a line to an exact position EditingRelocate a line or range without cutting it into a register.
- :%s/colour/color/gcReview every replacement EditingAsk before replacing each matching occurrence.
- :&&Repeat a substitution with its flags Repeat & scaleRepeat the previous substitution on the current line while retaining its flags.
- :%s/\Va.b/X/gTreat punctuation as literal text EditingUse \V so most punctuation in a search pattern loses its special meaning.
- :s/id=\zs\d\+\ze;/42/Match context, replace only the value EditingUse \zs and \ze to set match boundaries inside a larger pattern.
- :cfdo %s/old/new/ge | updateApply one edit per quickfix file WorkspaceRun a buffer-wide edit once for each file in the current quickfix list.
- :cdo s/old/new/ge | updateEdit only quickfix entry lines WorkspaceRun a line substitution at every valid quickfix entry.
- <C-v>2jI# <Esc>Add a prefix to several lines EditingInsert the same text at the left edge of a Visual block.
- @:Replay the last colon command Repeat & scaleExecute the most recent command-line command again.
- @a then @@Replay the last macro again Repeat & scaleUse @@ to execute the most recently used register as a macro.
- q:Edit an old command like buffer text Repeat & scaleOpen Ex command history in a window with Normal-mode editing.
- q/Reuse a complex search pattern Repeat & scaleOpen forward-search history in an editable window.
- :earlier 5m or :later 5mRecover an earlier text state EditingMove through undo history by approximate elapsed time, including branches.
- :read !printf "ready\n"Read shell output into the buffer WorkspaceInsert shell command output below the current line.
- :%write !wc -lSend text to a shell tool WorkspaceSend a range to a command’s standard input without replacing the buffer.
- :saveas draft-v2.txtSwitch to a newly saved path WorkspaceWrite the buffer to a new file and make that path its current name.
- ZZSave changes and close the window WorkspaceWrite the current buffer if modified, then close the current window.
- z=Correct a word with built-in suggestions WorkspaceShow suggested spellings for the word under or after the cursor.
- <C-w>TMove a split into its own tab WorkspaceMove the current window from a split layout to a new tab page.
- :argdo %s/old/new/ge | updateApply an edit to an argument list WorkspaceUse the argument list as an explicit batch of files.
- gRHi<Esc>Use Virtual Replace for aligned text EditingReplace by screen columns to keep text aligned when a tab or wide character spans several columns.
- :%sort uSort a list and remove duplicate lines EditingSort the chosen lines and keep one copy of identical lines.
- gaInspect the character under the cursor NavigationShow a character’s numeric value in decimal, hexadecimal, and octal.
- zz or zt or zbReposition the view around a line NavigationPlace the current line at the middle, top, or bottom of the window.
- gj or gkNavigate a long wrapped paragraph NavigationMove down or up by display lines instead of file lines.
- <C-o> or <C-i>Retrace searches and large jumps NavigationVisit older or newer positions in the window’s jump list.
- `[ or `]Find the edges of a change or yank NavigationJump to Vim’s start or end mark for recently changed or yanked text.
- "ayyj"AyyCollect text in one register Vim memoryUse an uppercase register name to append to its lowercase register.
- gJJoin lines exactly EditingJoin the next line without inserting or deleting boundary whitespace.
- <C-v>2j$A;<Esc>Append text to a Visual block EditingAppend the same suffix to the ends of selected lines.
- o or OAdjust a selection from its other end NavigationSwap the active end of a Visual selection so you can refine the opposite edge.
- <C-a> in Insert modeReuse your previous inserted text Repeat & scaleInsert the text from the previous insertion again.