Skip to content

Instantly share code, notes, and snippets.

@dsaves
Last active August 20, 2018 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsaves/f0505f7376fe9da0b2944efe10dbb5b0 to your computer and use it in GitHub Desktop.
Save dsaves/f0505f7376fe9da0b2944efe10dbb5b0 to your computer and use it in GitHub Desktop.
.vimrc
" Convert tabs to 4 spaces,
" Trim trailing whitespace
function! Wspace()
:%s/\t/ /g
:%s/\s\+$//e
endfunction
command! Wspace call Wspace()
set hlsearch
"filetype plugin indent on
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment