Vim : Customisation


 
Vim has so many options to customise. For example: if you want line number in left most column you can do that by doing as follow:
1. press <Esc> to enter into command mode
2. type :set nu and press enter

See how easily you customise it. There are so many options that you can try. Few useful tweaks are added below. Give it a try.

:set nu show line number
:set rnu show relative line number
:set noswapfile no any swapfile will be created. By default vim creates .swp files.
:set cursorline show cursorline
:set tabstop=4 set tabstop to 4 spaces
:set history=100 save history of last 100 commands
:set scrolloff=10 the cursor will be 10 line above the last line always
:set ruler show ruler
:syntax on syntax highlight
:set showmode show in which mode you are working
:set autoindent show indentation
:set foldcolumn=4 show foldslevel in a left column
:set foldlevel=2 folds code beyond level 2. Until 2 level it doesn’t fold
:set foldmethod=indent Folds based on indentation


I love these settings and helps me a lot.
Please let me know if you find this useful.

Comments