How do I create a custom Ex command?
:command Name action
The :command command defines a new user Ex command.
: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.
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim-plug is a minimalist plugin manager for Vim.
: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.
:verbose set option?
The :verbose prefix shows where an option was last set (which file, which line).
:set option
The :set command changes Vim options for the current session.
:source %
The :source command reads and executes a Vimscript file.
:autocmd Event pattern command
Autocommands let you execute commands automatically in response to events like opening a file, saving, or changing buffers.
:set hlsearch
The hlsearch option highlights all matches of the current search pattern throughout the file, making it easy to see where matches occur.