" disable builtin filetype feature (turned back on later) set nocompatible filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() " This is Vundle, which can be found in Github at gmarik/vundle.git " specify GitHub repos with 'user/repository' format Plugin 'VundleVim/Vundle.vim' " nerdtree allows filesystem navigation while in vim " :help NERD_tree.txt Plugin 'scrooloose/nerdtree.git' Plugin 'scrooloose/nerdcommenter' " ctrl-p file search Plugin 'kien/ctrlp.vim' " To get plugins from vim scripts, reference the plugin by name as it appears " on the site Plugin 'jeetsukumaran/vim-buffergator' " git integration Plugin 'tpope/vim-fugitive' " cs command for changing 'surroundings' ie quotes, brackets and tags " counterpart to builtin ci command Plugin 'tpope/vim-surround' " repeat integration for other tpope extensions Plugin 'tpope/vim-repeat' " git autocomplete "Plugin 'Valloric/YouCompleteMe' " python autocomplete Plugin 'davidhalter/jedi-vim' " python folding "Plugin 'tmhedberg/SimpylFold' " ack search tool Plugin 'mileszs/ack.vim' " ag plugin for ack.vim, for speedup Plugin 'ggreer/the_silver_searcher' " superawesome color schemes Plugin 'flazz/vim-colorschemes' " python syntax Plugin 'hdima/python-syntax' " javascript syntax Plugin 'jelera/vim-javascript-syntax' Plugin 'scrooloose/syntastic' " code tag listing: see methods and members of an object "Plugin 'vim-scripts/taglist-plus' Plugin 'majutsushi/tagbar' " status Plugin 'bling/vim-airline' " most recently used files Plugin 'vim-scripts/mru.vim' " aka zencoding: Plugin 'mattn/emmet-vim' " Spell check Plugin 'kamykn/spelunker.vim' call vundle#end() " all plugins must be declared before this point " turn filetype functionality back on. filetype plugin indent on " custom options " line numbering set number " tab size set tabstop=4 set shiftwidth=4 " convert tabs to spaces set expandtab " instant search: jump to results on keydown set incsearch " highlight search results set hlsearch " case insensitive IFF search string is all lower case set smartcase " number of lines to keep below/above cursor, ie scroll when cursor gets " within 10 spaces top/bottom of screen set scrolloff=6 " indentation set autoindent set smartindent set t_Co=256 " color apprentice " color BadWolf color atom " color automation " color codeschool " YouCompleteMe plugin keymaps " GoTo tries GoToDefinition then GoToDeclaration "nnoremap gd :YcmCompleter GoTo "nnoremap gD :YcmCompleter GoToDeclaration " vim-jedi equivalents of YCM (see above) map gd :call jedi#goto() map gD :call jedi#goto_assignments() " SimplyIFold plugin keymaps " fold docstrings let g:SimpylFold_docstring_preview = 0 autocmd BufWinEnter *.py setlocal foldexpr=SimpylFold(v:lnum) foldmethod=expr autocmd BufWinLeave *.py setlocal foldexpr< foldmethod< autocmd BufRead *.py normal zR " ctrlp plugin options " working path always stays in start directory let g:ctrlp_working_path_mode = 0 " index everything (rather than only marked directories) let g:ctrlp_root_markers = [''] " infinite max files let g:ctrlp_max_files = 0 " near-infinite max depth. Whee! " let g:ctrlp_max_depth = 99 " sane custom ignore let g:ctrlp_custom_ignore = { \ 'dir': '\.git$\|\.hg$\|\.svn$\|\.yardoc\|public\/images\|public\/system\|tmp$', \ 'file': '\.exe$\|\.so$\|\.dat$\|\.jar$\|\.pyc$\|\.pdf$\|\.ipynb$\|\.ico$\|\.png$\|\.jpg$\|\.gif$\|\.bmp$\|\.svg$\|\.xcf$\|\.swf$\|\.pst$\|\.swc$\|\.zip$\|\.gz$\|\.tar$' \ } " default indexing root is workspace map :CtrlP /home/dev/workspace "autocmd ColorScheme * highlight ExtraWhitespace ctermbg=black guibg=black "highlight ExtraWhitespace ctermbg=black guibg=black " ack and ag " set silver_searcher as default codesearching tool " -S: case sensitive only if query includes capital letters " --max-count: sanity check, stop searching after 100 hits " --nogroup: don't search file names (use CtrlP for searching filenames) " --column: print column numbers in results let g:ackprg = 'ag --nogroup --column -S --max-count 100' " buffergator: no more cts! " switch windows using g rather than map gwh h map gwl l map gwj j map gwk k " move windows using g rather than map gwH H map gwL L map gwJ J map gwK K " open windows using t map wh map wl map wj map wk " NERD tree map nn :NERDTreeFind map nf :NERDTreeToggle map nb :NERDTreeFromBookmark " taglist-plus map tl :TagbarToggle " syntastic options: defaults "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 " tabs: no more cts " switch tabs with gt map gtl :tabn map gth :tabp map gt0 :tabfirst " move tabs with gt map gtL :execute 'silent! tabmove ' . tabpagenr() map gtH :execute 'silent! tabmove ' . (tabpagenr()-2) " new tab with gtn ('go tab new'). TODO definitely needs to be changed map gtn :tabedit " close tab with ZT map ZT :tabclose " NERDCommenter " add 1 space between comment character and commented text let NERDSpaceDelims=1 " Ack: TODO NEEDS WORK " searches for visually highlighted text, using register 'a' " \av: searches visually highlighted text " copies visual into 'a' register, yanks, calls :Ack, escapes and " enters contents of 'a' map av "ay:Ack =fnameescape(@a) " \aw: searches for word under cursor " yanks in word into 'a' register, calls :Ack, escapes and enters contents of " 'a' map aw "ayiw:Ack =fnameescape(@a) " \aW: searches for whitespace-delimited text under cursor map aW "ayiW:Ack =fnameescape(@a) " \aa: open Ack map aa :Ack " \a%: search for current file name by accessing the % (filename) register and " removing the path map a% :Ack =expand('%:t') " get rid of marks let g:showmarks_enable = 0