Skip to content

Instantly share code, notes, and snippets.

@franciscojunior
Created May 12, 2016 14:34
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 franciscojunior/c4c2140e3302a04c8af87ac771b906a0 to your computer and use it in GitHub Desktop.
Save franciscojunior/c4c2140e3302a04c8af87ac771b906a0 to your computer and use it in GitHub Desktop.
My vimrc
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" From
" http://stackoverflow.com/questions/234564/tab-key-4-spaces-and-auto-indent-after-curly-braces-in-vim
set tabstop=4
set shiftwidth=4
set expandtab
syntax on
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
augroup END
else
set autoindent " always set autoindenting on
endif " has("autocmd")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment