Skip to content

Instantly share code, notes, and snippets.

@ganapathichidambaram
Created November 18, 2021 21:04
Show Gist options
  • Save ganapathichidambaram/b80d47db5ad218a01c0296ae1404a170 to your computer and use it in GitHub Desktop.
Save ganapathichidambaram/b80d47db5ad218a01c0296ae1404a170 to your computer and use it in GitHub Desktop.
Some Important VIMRC configuration
" Turn syntax highlighting on.
syntax on
" Set tab width to 4 columns.
set tabstop=4
" Set shift width to 4 spaces.
set shiftwidth=4
set autoindent
" Use space characters instead of tabs.
set expandtab
set smarttab
set softtabstop=0
" Highlight cursor line underneath the cursor horizontally.
set cursorline
set mouse=r
" Limit the files searched for auto-completes.
set complete-=i
set backspace=indent,eol,start
set display+=lastline
set autoread
set encoding=utf-8
set fileencoding=utf-8
set fileencodings=utf-8
" Disable compatibility with vi which can cause unexpected issues.
set nocompatible
" Enable type file detection. Vim will be able to try to detect the type of file is use.
filetype on
" Enable plugins and load plugin for the detected file type.
filetype plugin on
" Load an indent file for the detected file type.
filetype indent on
" Ignore capital letters during search.
set ignorecase
" Show the mode you are on the last line.
set showmode
" Show matching words during a search.
set showmatch
" Use highlighting when doing a search.
set hlsearch
" Enable auto completion menu after pressing TAB.
set wildmenu
" Make wildmenu behave like similar to Bash completion.
set wildmode=list:longest
" There are certain files that we would never want to edit with Vim.
" Wildmenu will ignore files with these extensions.
set wildignore=*.docx,*.jpg,*.png,*.gif,*.pdf,*.pyc,*.exe,*.flv,*.img,*.xlsx
" STATUS LINE ------------------------------------------------------------ {{{
" Clear status line when vimrc is reloaded.
set statusline=
" Status line left side.
set statusline+=\ %F\ %M\ %Y\ %R
" Use a divider to separate the left side from the right side.
set statusline+=%=
" Status line right side.
set statusline+=\ ascii:\ %b\ hex:\ 0x%B\ row:\ %l\ col:\ %c\ percent:\ %p%%
" Show the status on the second to last line.
set laststatus=2
" }}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment