Skip to content

Instantly share code, notes, and snippets.

@shreydesai
Created January 30, 2018 21:04
Show Gist options
  • Save shreydesai/a69ff0d579ffac924bb802219c31324c to your computer and use it in GitHub Desktop.
Save shreydesai/a69ff0d579ffac924bb802219c31324c to your computer and use it in GitHub Desktop.
Vim Config File
colorscheme dracula
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Use filetype detection and file-based automatic indenting.
filetype plugin indent on
" Use actual tab chars in Makefiles.
autocmd FileType make set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab
endif
" For everything else, use a tab width of 4 space chars.
set tabstop=2 " The width of a TAB is set to 4.
" Still it is a \t. It is just that
" Vim will interpret it to be having
" a width of 4.
set shiftwidth=2 " Indents will have a width of 4.
set softtabstop=2 " Sets the number of columns for a TAB.
set expandtab " Expand TABs to spaces.
" Column of 80 characters.
set colorcolumn=80
highlight ColorColumn ctermbg=DarkGray guibg=lightgrey
" Highlight chars over 80 characters.
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
" Search highlighting.
set hlsearch
set incsearch
" Line numbers.
set number
" Scroll when near bottom.
set scrolloff=5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment