Check this reference guide for further details.
| Setting | Description |
|---|---|
set nocompatible |
Disables legacy Vi compatibility, unlocks full Vim features. |
set ff=unix |
Uses Unix-style line endings (LF). |
set encoding=utf-8 |
Sets global text encoding to UTF-8 for multilingual/text handling. |
filetype plugin indent on |
Enables filetype detection, plugin loading, and smart indentation. |
syntax on |
Turns on syntax highlighting. |
| Setting | Description |
|---|---|
set nowrap |
Prevents soft-wrapping of long lines. |
set textwidth=79 |
Auto-wraps text at 79 chars (code/style preference). |
set formatoptions=tcqrn1 |
Controls paragraph formatting and auto-wrapping: e.g. auto-wrap comments, join lines, etc. |
set tabstop=4 |
Sets tab width to 4 spaces. |
set shiftwidth=4 |
Sets indentation for >>, <<, and auto-indent. |
set softtabstop=4 |
Soft tab key works as 4 spaces. |
set expandtab |
Converts typed tabs to spaces. |
set noshiftround |
Prevents rounding indentation to multiples of shiftwidth. |
| Setting | Description |
|---|---|
set scrolloff=3 |
Leaves 3 lines visible around the cursor while scrolling. |
set backspace=indent,eol,start |
Makes backspace work over indents, EOLs, and at insert start. |
set matchpairs+=<:> |
Adds < and > for pair jump navigation with %. |
nnoremap B ^ |
Remaps B to go to start of line. |
nnoremap E $ |
Remaps E to go to end of line. |
| Setting | Description |
|---|---|
set ttyfast |
Tells Vim terminal is fast, turning on snappier redraw. |
set cursorline |
Highlights the current cursor row. |
| Setting | Description |
|---|---|
set number |
Shows line numbers. |
set ruler |
Shows current position (row/col) on status bar. |
set laststatus=2 |
Always displays status line. |
set showmode |
Displays current editing mode in status bar. |
set showcmd |
Shows partial typed command in lower right. |
| Setting | Description |
|---|---|
vnoremap <expr> // 'y/\\V'.escape(@", '\\').'<CR>' |
Visually select then press // to search for the exact selection. |
set hlsearch |
Highlights all instances of the last search. |
set incsearch |
Matches candidates as you type your search pattern. |
set ignorecase |
Ignores case in search patterns. |
set smartcase |
Makes search case-sensitive if you use uppercase letters. |
set showmatch |
Briefly jumps to matching parenthesis when typing one. |
map <leader>c :let @/=''<cr> |
<leader>c (,c) clears highlighted search. |
| Setting | Description |
|---|---|
set listchars=tab:▸\\ ,eol:¬ |
Shows tab and EOL characters visually. |
map <leader>t :set list!<CR> |
Toggles visible whitespace marks. |
| Setting | Description |
|---|---|
set foldenable |
Turns on folding. |
set foldmethod=indent |
Uses indentation to detect folds. |
set foldlevelstart=10 |
Opens most folds by default (nesting up to level 10). |
set foldnestmax=10 |
Maximum allowed fold nesting. |
nnoremap <leader>f za |
Toggles fold at cursor with <leader>f (,f). |
| Setting | Description |
|---|---|
if !has('nvim') / set ttymouse=xterm2 / endif |
Improve mouse support on non-Neovim Vim. |
if exists(':tnoremap') / tnoremap <Esc> <C-\><C-n> / endif |
In terminal buffers, Esc returns to normal mode in Neovim. |
| Setting | Description |
|---|---|
let g:NERDTreeNodeDelimiter = "\u00a0" |
Sets NERDTree node delimiter for better layout. |
set runtimepath^=~/.vim/bundle/ctrlp.vim |
Adds ctrlp.vim plugin path. |
| Setting | Description |
|---|---|
let mapleader="," |
Sets leader key to , for shortcut mappings. |