Configure Vim in Terminal
[wpdm_package id=’1213′]
Vim configuration help you set options like automatic indentation, color, history, smart tab, parentheses balancing, serach options, syntax highlight etc. Vim configuration save a lot of time while writing programs and makes it easy to understand your program.
Follow the 5 easy steps to configure your vim your way…
1. Open your terminal or press Ctrl+Alt+t
2. Open .vimrc file. Type “vim ~/.vimrc” (” ” are just for clearity)
3. Copy and paste the code give below.
4. Save and close .vimrc file.
5. Your done. 🙂
[sourcecode language=”bash”]
"Show line number
set number
"use extended function of vim(no compatible with vim)
set nocompatible
"Indent automatically depending on filetype
filetype indent on
set autoindent
"By default vim only remembers 20 commands and search patterns entered, but with set history vim take 1000 search history
set history=1000
"Ignore Case
set ignorecase
"Distinct Capital if we mix it in search words
set smartcase
"Hidhlights matched words
set hlsearch
"use incremental search
set incsearch
"highlights parentheses
set showmatch
"show color display
syntax on
"change colors for syntex
highlight Comment ctermfg=LightCyan
"wrap lines
set wrap
set smarttab
"set terminal title
set title
[/sourcecode]