call pathogen#infect() call pathogen#helptags() """" PLUGIN SETTINGS """ Python-Mode settings let g:pymode_lint = 0 let g:pymode_lint_checker = "pyflakes" " don't complete with rope let g:pymode_rope_completion = 0 let g:pymode_breakpoint_cmd = 'import ipdb;ipdb.set_trace() # FIXME: breakpoint!' " syntax highlighting let g:pymode_syntax = 1 let g:pymode_syntax_all = 1 let g:pymode_syntax_indent_errors = g:pymode_syntax_all let g:pymode_syntax_space_errors = g:pymode_syntax_all " don't autofold code let g:pymode_folding = 0 """ End Python-Mode settings " Syntastic let g:syntastic_python_checkers = ['pyflakes', 'pep8', 'pep257'] " Powerline! set rtp+=~/dotfiles/misc-files/powerline/powerline/bindings/vim " """ Easymotion map / (easymotion-sn) map / (easymotion-tn) map n (easymotion-next) map N (easymotion-prev) let g:EasyMotion_landing_highlight = 1 """ CtrlP """ Gundo map u :GundoToggle """" END PLUGIN SETTINGS let mapleader="," set nobackup set noswapfile set pastetoggle= filetype on filetype plugin indent on syntax on colorscheme lucius set t_Co=256 if &term =~ 'xterm-color' set t_ut= endif let g:Powerline_symbols = 'fancy' set nocompatible set laststatus=2 if v:version >= 703 "undo settings set undodir=~/.vim/undofiles set undofile set colorcolumn=+1 "mark the ideal max text width endif set showmode set number set numberwidth=1 set background=dark set cursorline set cursorcolumn set ruler " do not redraw while macroing set lazyredraw set matchpairs+=<:> set list set listchars=tab:>-,trail:-,extends:>,precedes:<,nbsp:+,eol:$ " Use the OS clipboard by default (on versions compiled with `+clipboard`) set clipboard=unnamed """ Searching and Patterns set ignorecase set smartcase set smarttab set hlsearch " Add the g flag to search/replace by default set gdefault """ Folding set nofoldenable " disabled statusline because of powerline """ Statusline "set statusline= " clear the statusline for when vimrc is reloaded "set statusline =%#identifier# "set statusline+=%{fugitive#statusline()} "set statusline+=[%f] "tail of the filename "set statusline+=%* " ""display a warning if fileformat isnt unix "set statusline+=%#warningmsg# "set statusline+=%{&ff!='unix'?'['.&ff.']':''} "set statusline+=%* " ""display a warning if file encoding isnt utf-8 "set statusline+=%#warningmsg# "set statusline+=%{(&fenc!='utf-8'&&&fenc!='')?'['.&fenc.']':''} "set statusline+=%* " "set statusline+=%h "help file flag "set statusline+=%y "filetype " ""read only flag "set statusline+=%#identifier# "set statusline+=%r "set statusline+=%* " ""modified flag "set statusline+=%#identifier# "set statusline+=%m "set statusline+=%* "set statusline+=%{StatuslineTrailingSpaceWarning()} " "set statusline+=%= "left/right separator "set statusline+=%c, "cursor column "set statusline+=%l/%L "cursor line/total lines "set statusline+=\ %P "percent through file "set laststatus=2 "recalculate the trailing whitespace warning when idle, and after saving autocmd cursorhold,bufwritepost * unlet! b:statusline_trailing_space_warning "return '[\s]' if trailing white space is detected return '' otherwise function! StatuslineTrailingSpaceWarning() if !exists("b:statusline_trailing_space_warning") if !&modifiable let b:statusline_trailing_space_warning = '' return b:statusline_trailing_space_warning endif if search('\s\+$', 'nw') != 0 let b:statusline_trailing_space_warning = '[\s]' else let b:statusline_trailing_space_warning = '' endif endif return b:statusline_trailing_space_warning endfunction """ Handy remaps noremap ; : inoremap jj nnoremap :TlistToggle map V :source ~/.vimrc:filetype detect:exe ":echo 'vimrc reloaded'" "nnoremap d :NERDTreeToggle map \q :q map \w :w noremap Q " Easy window navigation map h map j map k map l " Don’t reset cursor to start of line when moving around. set nostartofline " minimal number of lines to keep above/below cursorline set scrolloff=10 """ Use the mouse set mouse=a """ smart path set path=.,,** " " Don't use tabs in python files autocmd FileType python setlocal expandtab tabstop=4 shiftwidth=4 command! -complete=shellcmd -nargs=+ Shell call s:RunShellCommand() function! s:RunShellCommand(cmdline) echo a:cmdline let expanded_cmdline = a:cmdline for part in split(a:cmdline, ' ') if part[0] =~ '\v[%#<]' let expanded_part = fnameescape(expand(part)) let expanded_cmdline = substitute(expanded_cmdline, part, expanded_part, '') endif endfor botright new setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap call setline(1, 'You entered: ' . a:cmdline) call setline(2, 'Expanded Form: ' .expanded_cmdline) call setline(3,substitute(getline(2),'.','=','g')) execute '$read !'. expanded_cmdline setlocal nomodifiable 1 endfunction