Posted on 2024-09-01 by Matt.
gq docs or :h gq
Format the current line
gqq
Format selected text. Mnemonic: GQ Magazine is fashionable and this operation makes your text fashionable.
gq
Configure maximum width used by gq and enable auto line-breaks at 120 cols (local to buffer)
" vimscript config
set textwidth=120
-- lua
vim.bo.textwidth = 120
Disable textwidth
" vimscript config
set textwidth=0
-- lua
vim.bo.textwidth = 0
<< docs or :h <<
Shift lines one shiftwidth left.
<<
Shift lines one shiftwidth right.
>>
Use . operator to shift multiple levels of indentation.
>>..
<<..
Shift a paragraph one shiftwidth left or right.
>ap
<ap
= docs or :h =
Auto-indent selected lines
=
Auto-indent a paragraph
=ap