# HG changeset patch # User Ludovic Chabant # Date 1469852995 25200 # Node ID 9580765366a41757ba0b0de8d03cc21271fd329b # Parent f00dd35b473145db87b8f6576e217dee25a463e1 Fix some python indenting stuff in vim. diff -r f00dd35b4731 -r 9580765366a4 vim/vimrc --- a/vim/vimrc Fri Jul 29 21:12:06 2016 -0700 +++ b/vim/vimrc Fri Jul 29 21:29:55 2016 -0700 @@ -44,14 +44,14 @@ " Load pathogen. runtime bundle/pathogen/autoload/pathogen.vim -" Potentially add the local bundle directory. -let s:pathogen_bundles = ['bundle/{}'] +" Add the bundle directory, and potentially add the local one if it exists. +" Note that we pass absolute paths to make pathogen prepend stuff before Vim's +" system files otherwise stuff like indent plugins don't work. +let s:pathogen_bundles = [s:vim_home.s:path_sep.'bundle'.s:path_sep.'{}'] if isdirectory(s:vim_home.s:path_sep.'local') - "execute 'set runtimepath+='.s:vim_home.s:path_sep.'local' - call add(s:pathogen_bundles, 'local/{}') + call add(s:pathogen_bundles, s:vim_home.s:path_sep.'local'.s:path_sep.'{}') endif call call('pathogen#infect', s:pathogen_bundles) -"call pathogen#runtime_append_all_bundles() " Hide the toolbar in MacVim/gVIM, and set a nice window size. if has("gui_running") && !exists('g:resourcing_vimrc') @@ -169,7 +169,7 @@ " Clipboard buffer. set clipboard=unnamed -" Smoot terminal experience. +" Smooth terminal experience. set ttyfast " Allow backspacing over anything. @@ -327,7 +327,7 @@ " Python-Mode {{{ let g:pymode = 1 -let g:pymode_python = 'python' +let g:pymode_python = 'python3' let g:pymode_syntax = 0 let g:pymode_syntax_all = 0 @@ -335,6 +335,8 @@ let g:pymode_syntax_print_as_function = 1 let g:pymode_syntax_space_errors = 1 +let g:pymode_indent = 0 + let g:pymode_run = 0 let g:pymode_lint = 0 @@ -395,12 +397,6 @@ autocmd Filetype less,css setlocal omnifunc=csscomplete#CompleteCSS augroup END -augroup VimRCFileType_python - au! - autocmd FileType python setlocal define=\\v^\\s*(def\|class)\\s+ - "autocmd FileType python if exists('python_space_error_highlight')|unlet python_space_error_highlight|endif -augroup END - augroup VimRCTrailingWhitespaces au! autocmd FileType php,ruby,python,js,css,less autocmd BufWritePre :call StripTrailingWhitespaces() @@ -422,6 +418,8 @@ noremap :tabnext noremap :tabprevious nnoremap t :tabnew +nnoremap :tabnew +nnoremap :tabclose " Window navigation nnoremap :wincmd k