How do I set the maximum line width for automatic text wrapping?
:set textwidth=80
The textwidth option sets the maximum width for text.
:set textwidth=80
The textwidth option sets the maximum width for text.
:command Name action
The :command command defines a new user Ex command.
autocmd FileType python setlocal ...
Using autocmd FileType with setlocal, you can configure settings that only apply when editing files of a specific type.
:set nobackup noswapfile
Disabling backup and swap files prevents Vim from creating extra files alongside your source code.
:colorscheme name
The :colorscheme command changes the visual theme of Vim.
:set cursorline
The cursorline option highlights the entire line where the cursor is positioned.
:filetype plugin indent on
The filetype plugin indent on command enables three key features: file type detection, filetype plugins, and filetype-based indentation.
:set number
The number option displays absolute line numbers in the left margin.
:set nowrap
The nowrap option prevents long lines from wrapping to the next screen line.
:set autoindent
The autoindent option copies the indentation from the current line when starting a new line.
:highlight Group ctermfg=color
The :highlight command changes the appearance of a highlight group.
:set statusline=%f\ %m%r%=%l/%L
The statusline option controls what information is shown in the status bar at the bottom of each window.
:nnoremap key command
The :nnoremap command creates a non-recursive normal mode mapping.
augroup name | autocmd! | ... | augroup END
Using augroup with autocmd! inside prevents duplicate autocommands from accumulating when you reload your vimrc.
:set completeopt=menu,menuone,noselect
The completeopt option controls the behavior of the completion popup menu.
:{range}w filename
The :w command with a range and filename saves only the specified lines to a new file.
:verbose set option?
The :verbose prefix shows where an option was last set (which file, which line).
:help topic
Vim has an extensive built-in help system.
:b {number}
The :b command followed by a buffer number switches directly to that buffer.
:{start},{end} command
Ex commands accept range specifiers that control which lines are affected.