Created
August 13, 2012 13:19
-
-
Save stephenroller/3340651 to your computer and use it in GitHub Desktop.
base vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
set nohls | |
" allow backspacing over everything in insert mode | |
set backspace=indent,eol,start | |
set nobackup | |
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 | |
set hidden " buffers can exist in background without a window | |
" 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 | |
filetype plugin on | |
autocmd filetype plugin indent 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 | |
syntax on | |
set ignorecase | |
set smartcase | |
set ts=4 sts=4 et sw=4 | |
set scrolloff=3 | |
set wildmode=longest,list | |
set shiftround | |
set nowrap | |
set whichwrap=h,l,~,[,] | |
"set mouse=a | |
" always show line numbers | |
set nu | |
" i love spaces | |
set et | |
" always use utf-8 | |
set encoding=utf-8 | |
" language specific stuff | |
set ai | |
au FileType python set et sts=4 "complete+=k~/.vim/ac/python.dict isk+=.,( | |
au FileType ruby set et sts=2 sw=2 ts=2 | |
au FileType php set complete+=k~/.vim/ac/php.dict isk+=.,( | |
au FileType tex set sts=2 ts=2 sw=2 et iskeyword+=: | |
au FileType tex let g:line_comment='% ' | |
au FileType scala set sts=2 ts=2 sw=2 et | |
set noswf " no swap file | |
" Don't show these files in project and ctrlp, etc | |
set wildignore+=*.o,*.obj,.git,*.pyc,*.class,*.jar,.DS_Store,*.bak,.hg | |
" ctrl-A and ctrl-E mapped everywhere | |
inoremap <C-a> <Home> | |
cnoremap <C-a> <Home> | |
"noremap <C-a> <Home> | |
inoremap <C-e> <End> | |
cnoremap <C-e> <End> | |
noremap <C-e> <End> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment