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.
7 results for "shift indent line"
>G
The >G command applies a right-indent shift to every line from the cursor through the last line of the buffer.
:set breakindentopt=shift:2
When breakindent is enabled, wrapped continuation lines are indented to match the start of their logical line.
> and <
How it works In visual mode, you can shift selected lines to the right or left using the > and to indent them or or shifts the selected lines one shiftwidth to
=G
The =G command applies Vim's auto-indent operator (=) from the current line to the last line of the file (G).
=
Pressing = in visual mode auto-indents the selected lines according to Vim's built-in indentation rules.
visual-mode #editing #visual-mode #indentation #formatting #productivity
:set breakindent
When wrap is enabled, long lines wrap to the next screen row starting at column 1 by default, which makes indented code look messy.
:g/pattern/cmd1 | cmd2
The :g (global) command can execute multiple Ex commands per matching line by chaining them with .
command-line #command-line #global #ex-commands #batch-editing #advanced