" General " {{{ colorscheme molokai set background=dark set number set showmode " display the current mode set wrap " always wrap set title " show title in console title bar set laststatus=2 " always show statusline " highlighting syntax enable set showmatch " highlight block ends set cursorline " highlight the cursor line " display tabs and trailing whitespace set list set listchars=tab:⇥·,trail:· match Error /\v\s+$/ " use the Error colors for trailing whitespace " indents set cindent set autoindent set indentkeys-=0# " do not break indent on # set tabstop=4 if has('mac') set expandtab set shiftwidth=4 endif " tab completion set wildmenu set wildmode=full " no backup set nobackup set nowritebackup set noswapfile " search set ignorecase " case insensitive search set smartcase " upper case search only matches uppercase set hlsearch " highlight search results set incsearch " search as you type set scrolljump=5 " lines to scroll when cursor leaves screen set scrolloff=3 " minimum lines to keep above and below cursor " windows set equalalways set splitbelow splitright " ignore these set wildignore=.svn,CVS,.git,.hg set wildignore+=*.o,*.a,*.class,*.mo,*.la,*.so,*.obj set wildignore+=*.sw*,*.jpg,*.png,*.xpm,*.gif set wildignore+=*.pyc,*templates/*.py,*.log set mouse=a " line at 80 if exists("&colorcolumn") set colorcolumn=80 endif " }}} " Remaps " {{{ " strip trailing whitespace (\ss) function! StripWhitespace() let save_cursor = getpos(".") let old_query = getreg('/') :%s/\s\+$//e call setpos('.', save_cursor) call setreg('/', old_query) endfunction noremap ss :call StripWhitespace() " ipdb map db Aimport ipdb; ipdb.set_trace() " pastebinit map pb :w !pastebinit - " directory of current buffer cnoremap $$ =expand('%:h').'/' " one keystroke to change buffers map h map j map k map l " }}} " Bundles " {{{ filetype off set rtp+=~/.vim/bundle/vundle/ call vundle#rc() Bundle 'gmarik/vundle' " CamelCaseMotion " {{{ Bundle 'bkad/CamelCaseMotion' " Replace the default 'w', 'b' and 'e' mappings for CamelCase (and_underscore) map w CamelCaseMotion_w map b CamelCaseMotion_b map e CamelCaseMotion_e sunmap w sunmap b sunmap e " Replace default 'iw' text-object and define 'ib' and 'ie' motions: omap iw CamelCaseMotion_iw xmap iw CamelCaseMotion_iw omap ib CamelCaseMotion_ib xmap ib CamelCaseMotion_ib omap ie CamelCaseMotion_ie xmap ie CamelCaseMotion_ie " }}} " Programming " {{{ Bundle 'vim-scripts/python.vim' let python_highlight_all = 1 " }}} " Powerline " {{{ Bundle 'Lokaltog/vim-powerline' " }}} " Neocomplcache " {{{ Bundle 'vim-scripts/neocomplcache' let g:neocomplcache_enable_at_startup = 1 " }}} " TagBar " {{{ Bundle 'majutsushi/tagbar' nmap \t :TagbarOpen['j'] " }}} " CtrlP " {{{ Bundle 'kien/ctrlp.vim' let g:ctrlp_working_path_mode = 'ra' let g:ctrlp_user_command = 'find %s -type f' let g:ctrlp_custom_ignore = { \ 'dir': '\v[\/]\.(git|hg|svn)$', \ 'file': '\v\.(exe|so|dll)$', \ } " CommandT map \e :CommandT let g:CommandTMaxFiles=100000 " }}} " jedi-vim " {{{ Bundle 'davidhalter/jedi-vim' let g:jedi#use_tabs_not_buffers = 0 let g:jedi#popup_on_dot = 0 " disable auto select first candidate in popup menu inoremap . .=jedi#do_popup_on_dot() ? "\C-X>\C-O>\C-P>" : "" " }}} " Git " {{{ Bundle 'tpope/vim-fugitive' nnoremap b :Gblame " }}} " Syntax " {{{ " Bundle 'vim-scripts/Syntastic' Bundle 'pyflakes.vim' " }}} " Rainbow Parens {{{ Bundle 'kien/rainbow_parentheses.vim' au VimEnter * RainbowParenthesesToggle au Syntax * RainbowParenthesesLoadRound au Syntax * RainbowParenthesesLoadSquare au Syntax * RainbowParenthesesLoadBraces let g:rbpt_colorpairs = [ \ ['brown', 'RoyalBlue3'], \ ['Darkblue', 'SeaGreen3'], \ ['darkgray', 'DarkOrchid3'], \ ['darkgreen', 'firebrick3'], \ ['darkcyan', 'RoyalBlue3'], \ ['darkred', 'SeaGreen3'], \ ['darkmagenta', 'DarkOrchid3'], \ ['brown', 'firebrick3'], \ ['gray', 'RoyalBlue3'], \ ['black', 'SeaGreen3'], \ ['darkmagenta', 'DarkOrchid3'], \ ['Darkblue', 'firebrick3'], \ ['darkgreen', 'RoyalBlue3'], \ ['darkcyan', 'SeaGreen3'], \ ['darkred', 'DarkOrchid3'], \ ['red', 'firebrick3'], \ ] " }}} " move " {{{ Bundle 'vim-scripts/move' " }}} filetype plugin indent on " }}} " Commented Shit " {{{ " " CommandT " map \e :CommandT " let g:CommandTMaxFiles=100000 " " }}}