How do I shift-indent all lines from the current cursor position to the end of the file?
>G
The >G command applies a right-indent shift to every line from the cursor through the last line of the buffer.
2125 results for "i" a""
>G
The >G command applies a right-indent shift to every line from the cursor through the last line of the buffer.
:set backupcopy=yes
When Vim saves a file, it may use a rename-style write strategy that can replace the original inode.
w
The w command moves the cursor forward to the beginning of the next word.
%:p:h
Vim's filename modifiers let you derive path components from the current file's name directly inside ex commands.
:vimgrep /{pattern}/j **/*
For project-wide searches, :vimgrep is powerful but can feel disruptive if it jumps into files while populating quickfix.
<C-r><C-f>
While typing a command, inserts the filename under the cursor in the buffer at the command-line prompt.
<C-d> (in command mode)
Pressing in Vim's command line displays the full list of matching completions below the command prompt, without cycling through them one at a time.
command-line #command-line #completion #ex-commands #navigation
dp / do
When reviewing differences between files in Vim's built-in diff mode, dp and do let you selectively apply individual hunks without leaving the editor.
g; and g,
Vim tracks every position where you made a change in the changelist.
:smagic/\vfoo.+/bar/
If you prefer very-magic regex syntax but don't want to change global settings, :smagic is a targeted solution.
?pattern
The ?pattern command searches backward through the file for the given pattern, starting from the cursor position and wrapping around to the end of the file if n
:g/^\s*$/,/./-1join
When text is hard-wrapped (for example from email, logs, or copied docs), joining entire paragraphs manually is slow and error-prone.
editing #editing #formatting #ex-commands #text-manipulation
:[range]center
Vim provides three Ex commands for aligning text within a specified column width: :[range]left, :[range]center, and :[range]right.
command-line #ex-commands #formatting #editing #command-line
:tab ball
:tab ball (short for :tab sball, "split all buffers in tabs") opens every listed buffer in its own tab page in a single command.
q/k?pattern<CR>
Vim's command-line history window (q: for Ex commands, q/ for search) opens a full editing buffer containing your history.
require('telescope.builtin').grep_string()
Telescope's grepstring() function performs a project-wide search for the exact word currently under the cursor, displaying live-previewed results in an interact
<C-w>H
The H command moves the current window to the far left, making it a full-height vertical split.
( and )
How it works Vim defines a sentence as text ending with .
:Buffers
The fzf.
[m
The [m motion jumps backward to the start of the nearest enclosing or preceding method definition.