How do I change the color scheme in Vim?
:colorscheme name
The :colorscheme command changes the visual theme of Vim.
: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.
:set incsearch
The incsearch option enables incremental search, which highlights matches in real time as you type the search pattern.
:set scrolloff=5
The scrolloff option keeps a minimum number of lines visible above and below the cursor when scrolling.
"*p vs "+p
How it works Vim has two system clipboard registers that interact with the operating system: " -- the selection register (PRIMARY selection on Linux/X11, clipbo
let @a = 'sequence'
How it works Macros recorded with q are stored in registers, but they are lost when you close Vim (unless you have the viminfo or shada file preserving them).