comparison vim/vimrc @ 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 8d68547c3660
children 2060d92ccc2f
comparison
equal deleted inserted replaced
351:f00dd35b4731 352:9580765366a4
42 call add(g:pathogen_disabled, 'ragtag') 42 call add(g:pathogen_disabled, 'ragtag')
43 call add(g:pathogen_disabled, 'interestingwords') 43 call add(g:pathogen_disabled, 'interestingwords')
44 44
45 " Load pathogen. 45 " Load pathogen.
46 runtime bundle/pathogen/autoload/pathogen.vim 46 runtime bundle/pathogen/autoload/pathogen.vim
47 " Potentially add the local bundle directory. 47 " Add the bundle directory, and potentially add the local one if it exists.
48 let s:pathogen_bundles = ['bundle/{}'] 48 " Note that we pass absolute paths to make pathogen prepend stuff before Vim's
49 " system files otherwise stuff like indent plugins don't work.
50 let s:pathogen_bundles = [s:vim_home.s:path_sep.'bundle'.s:path_sep.'{}']
49 if isdirectory(s:vim_home.s:path_sep.'local') 51 if isdirectory(s:vim_home.s:path_sep.'local')
50 "execute 'set runtimepath+='.s:vim_home.s:path_sep.'local' 52 call add(s:pathogen_bundles, s:vim_home.s:path_sep.'local'.s:path_sep.'{}')
51 call add(s:pathogen_bundles, 'local/{}')
52 endif 53 endif
53 call call('pathogen#infect', s:pathogen_bundles) 54 call call('pathogen#infect', s:pathogen_bundles)
54 "call pathogen#runtime_append_all_bundles()
55 55
56 " Hide the toolbar in MacVim/gVIM, and set a nice window size. 56 " Hide the toolbar in MacVim/gVIM, and set a nice window size.
57 if has("gui_running") && !exists('g:resourcing_vimrc') 57 if has("gui_running") && !exists('g:resourcing_vimrc')
58 set guioptions=-t 58 set guioptions=-t
59 set lines=999 59 set lines=999
167 set encoding=utf-8 167 set encoding=utf-8
168 168
169 " Clipboard buffer. 169 " Clipboard buffer.
170 set clipboard=unnamed 170 set clipboard=unnamed
171 171
172 " Smoot terminal experience. 172 " Smooth terminal experience.
173 set ttyfast 173 set ttyfast
174 174
175 " Allow backspacing over anything. 175 " Allow backspacing over anything.
176 set backspace=indent,eol,start 176 set backspace=indent,eol,start
177 177
325 " }}} 325 " }}}
326 326
327 " Python-Mode {{{ 327 " Python-Mode {{{
328 328
329 let g:pymode = 1 329 let g:pymode = 1
330 let g:pymode_python = 'python' 330 let g:pymode_python = 'python3'
331 331
332 let g:pymode_syntax = 0 332 let g:pymode_syntax = 0
333 let g:pymode_syntax_all = 0 333 let g:pymode_syntax_all = 0
334 let g:pymode_syntax_builtin_objs = 1 334 let g:pymode_syntax_builtin_objs = 1
335 let g:pymode_syntax_print_as_function = 1 335 let g:pymode_syntax_print_as_function = 1
336 let g:pymode_syntax_space_errors = 1 336 let g:pymode_syntax_space_errors = 1
337
338 let g:pymode_indent = 0
337 339
338 let g:pymode_run = 0 340 let g:pymode_run = 0
339 341
340 let g:pymode_lint = 0 342 let g:pymode_lint = 0
341 let g:pymode_trim_whitespaces = 0 343 let g:pymode_trim_whitespaces = 0
393 autocmd Filetype less,css setlocal foldmarker={,} 395 autocmd Filetype less,css setlocal foldmarker={,}
394 autocmd Filetype less,css setlocal iskeyword+=- 396 autocmd Filetype less,css setlocal iskeyword+=-
395 autocmd Filetype less,css setlocal omnifunc=csscomplete#CompleteCSS 397 autocmd Filetype less,css setlocal omnifunc=csscomplete#CompleteCSS
396 augroup END 398 augroup END
397 399
398 augroup VimRCFileType_python
399 au!
400 autocmd FileType python setlocal define=\\v^\\s*(def\|class)\\s+
401 "autocmd FileType python if exists('python_space_error_highlight')|unlet python_space_error_highlight|endif
402 augroup END
403
404 augroup VimRCTrailingWhitespaces 400 augroup VimRCTrailingWhitespaces
405 au! 401 au!
406 autocmd FileType php,ruby,python,js,css,less autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces() 402 autocmd FileType php,ruby,python,js,css,less autocmd BufWritePre <buffer> :call <SID>StripTrailingWhitespaces()
407 augroup END 403 augroup END
408 404
420 416
421 " Tab navigation 417 " Tab navigation
422 noremap <C-Tab> :tabnext<cr> 418 noremap <C-Tab> :tabnext<cr>
423 noremap <C-S-Tab> :tabprevious<cr> 419 noremap <C-S-Tab> :tabprevious<cr>
424 nnoremap <leader>t :tabnew<cr> 420 nnoremap <leader>t :tabnew<cr>
421 nnoremap <C-t> :tabnew<cr>
422 nnoremap <C-w> :tabclose<cr>
425 423
426 " Window navigation 424 " Window navigation
427 nnoremap <C-up> :wincmd k<cr> 425 nnoremap <C-up> :wincmd k<cr>
428 nnoremap <C-down> :wincmd j<cr> 426 nnoremap <C-down> :wincmd j<cr>
429 nnoremap <C-left> :wincmd h<cr> 427 nnoremap <C-left> :wincmd h<cr>