set rtp+=~/.vim/bundle/vundle/ call vundle#rc() let g:vundle_default_git_proto='git' Bundle 'gmarik/vundle' Bundle 'tpope/vim-fugitive' Bundle 'kien/ctrlp.vim' Bundle 'plasticboy/vim-markdown' Bundle 'sjl/gundo.vim' Bundle 'scrooloose/syntastic' Bundle 'wincent/Command-T' Bundle 'scrooloose/nerdtree' " sudo write this cmap W! w !sudo tee % >/dev/null cmap w!! w !sudo tee % >/dev/null syntax on filetype on filetype plugin indent on set number " set background=dark set title " autocompletion set wildmenu set wildmode=full set wildignore+=*.o,*.obj,.git,*.pyc set wildignore+=eggs/** set wildignore+=*.egg-info/** """ Moving Around/Editing " set cursorline " have a line indicate the cursor location set ruler " show the cursor position all the time set nostartofline " Avoid moving cursor to BOL when jumping around set virtualedit=block " Let cursor move past the last char in mode set scrolloff=3 " Keep 3 context lines above and below the cursor set backspace=2 " Allow backspacing over autoindent, EOL, and BOL set showmatch " Briefly jump to a paren once it's balanced set wrap " Wrap text set linebreak " don't wrap textin the middle of a word set autoindent " always set autoindenting on set smartindent " use smart indent if there is no indent file set tabstop=4 " inserts 4 spaces set shiftwidth=4 " And an indent level is 4 spaces wide. set softtabstop=4 " over an autoindent deletes all spaces. set expandtab " Use spaces, not tabs, for autoindent/tab key. set shiftround " rounds indent to a multiple of shiftwidth set formatoptions=tcroql " Setting text and comment formatting to auto set textwidth=80 " lines are automatically wrapped after 80 columns set nofoldenable " turn off folding set colorcolumn=80 " highlight column 80 (where words will wrap) """" Reading/Writing set autowriteall " Don't bother me about changed buffers set noautoread " Don't automatically re-read changed files. set modeline " Allow vim options to be embedded in files; set modelines=5 " they must be within the first or last 5 lines. """" Messages, Info, Status set ls=2 " allways show status line set showcmd " Show incomplete normal mode commands as I type. set report=0 " : commands always print changed line count. set shortmess+=a " Use [+]/[RO]/[w] for modified/readonly/written. set laststatus=2 " Always show statusline, even if only 1 window. """ Searching and Patterns set ignorecase " Default to using case insensitive searches, set smartcase " unless uppercase letters are used in the regex. set hlsearch " Highlight searches by default. set incsearch " Incrementally search while typing a /regex " Paste from clipboard map p "+p " hide matches on space nnoremap :nohlsearch " Remove trailing whitespace on S nnoremap S :%s/\s\+$//:let @/='' " Select the item in the list with enter inoremap pumvisible() ? "\" : "\u\" map :bn map :bp " Automatically add breakpoint for PDB nnoremap P Oimport pdb; pdb.set_trace(f &ft == "scala" set tabstop=2 set shiftwidth=2 set softtabstop=2 if exists("+undofile") " undofile - This allows you to use undos after exiting and restarting " This, like swap and backups, uses .vim-undo first, then ~/.vim/undo " :help undo-persistence " This is only present in 7.3+ if isdirectory($HOME . '/.vim/undo') == 0 :silent !mkdir -p ~/.vim/undo > /dev/null 2>&1 endif set undodir=./.vim-undo// set undodir+=~/.vim/undo// set undofile endif hi DiffText gui=underline guibg=red guifg=black " nerdtree " autocmd StdinReadPre * let s:std_in=1 autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif set mouse=a map :NERDTreeToggle " Close if nothing autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif let NERDTreeDirArrows=0 " syntastic " set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0