Mercurial > dotfiles
changeset 352:9580765366a4
Fix some python indenting stuff in vim.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Fri, 29 Jul 2016 21:29:55 -0700 |
parents | f00dd35b4731 |
children | 29729aa05fac |
files | vim/vimrc |
diffstat | 1 files changed, 11 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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 <buffer> :call <SID>StripTrailingWhitespaces() @@ -422,6 +418,8 @@ noremap <C-Tab> :tabnext<cr> noremap <C-S-Tab> :tabprevious<cr> nnoremap <leader>t :tabnew<cr> +nnoremap <C-t> :tabnew<cr> +nnoremap <C-w> :tabclose<cr> " Window navigation nnoremap <C-up> :wincmd k<cr>