Skip to content

Instantly share code, notes, and snippets.

@mabrizio
Created January 27, 2014 04:29
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 mabrizio/8643280 to your computer and use it in GitHub Desktop.
Save mabrizio/8643280 to your computer and use it in GitHub Desktop.
.vimrc
if v:progname =~? "evim"
finish
endif
set sw=4 "Identation is now 4 white spaces
set nocompatible
set nomodeline
set backspace=indent,eol,start
if has("vms")
set nobackup " do not keep a backup file, use versions instead
else
set backup " keep a backup file
set backupext=.old " extension of the backup file
set backupdir=~/.backup " directory to store the backup files
endif
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
map Q gq
if &t_Co > 2 || has("gui_running")
syntax on
set hlsearch
endif
if has("autocmd")
filetype plugin indent on
augroup vimrcEx
au!
autocmd FileType text setlocal textwidth=78
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
augroup END
else
set autoindent " always set autoindenting on
endif " has("autocmd")
set expandtab " no tabs!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment