diff --git a/ftplugin/python.vim b/ftplugin/python.vim new file mode 100644 index 0000000..fa9cdc5 --- /dev/null +++ b/ftplugin/python.vim @@ -0,0 +1,2 @@ +iabbrev inp import numpy as np +iabbrev ipl import matplotlib.pyplot as plt diff --git a/plugin/comment.vim b/plugin/comment.vim index e9c20c8..c246699 100644 --- a/plugin/comment.vim +++ b/plugin/comment.vim @@ -7,7 +7,8 @@ let s:comment_map = { \ 'vim': '"', \ 'tex': '%', \ 'plaintex': '%', - \ 'sh': '#' + \ 'sh': '#', + \ 'make': '#', \ } let s:block_map = { @@ -28,7 +29,8 @@ function! MyCommenter(uncomment) range endif let search_range = a:firstline . ',' . a:lastline - " Uncomment the line (when commenting this avoids multiple comment chars) + " Uncomment the line anyway (when commenting this avoids multiple comment + " chars) execute search_range . 's/\(^\s*\)\(' . comment . '\s*\)\+/\1/e' if !a:uncomment " Comment diff --git a/plugin/settings.vim b/plugin/settings.vim index 5c6fc9e..c3f05fb 100644 --- a/plugin/settings.vim +++ b/plugin/settings.vim @@ -50,6 +50,7 @@ set langmenu=en_US.UTF-8 " Tagbar stuff " {{{ let g:tagbar_autofocus = 1 +let g:tagbar_map_close = "qT" " }}} " LatexBox stuff @@ -57,7 +58,7 @@ let g:tagbar_autofocus = 1 let g:LatexBox_no_mappings = 1 let g:LatexBox_quickfix = 2 let g:LatexBox_build_dir = 'build' -let g:LatexBox_latexmk_options = '-xelatex -outdir=build' +let g:LatexBox_latexmk_options = '-xelatex -outdir=build -shell-escape' " }}} " YouCompleteMe stuff @@ -67,15 +68,19 @@ let g:ycm_autoclose_preview_window_after_completion = 0 let g:ycm_filetype_blacklist = { \ 'tex': 1, \ 'markdown': 1, - \ 'text': 1 + \ 'text': 1, + \ 'rst': 1, \ } set shortmess+=c " }}} " Syntastic Stuff " {{{ -let g:syntastic_mode_map = {'mode': 'passive'} -" let g:syntastic_aggregate_errors = 1 +let g:syntastic_mode_map = { + \ 'mode': 'passive', + \ 'active_filetypes': ['python'] + \} +let g:syntastic_python_checkers = ['python', 'pyflakes'] " }}} " Coding style @@ -98,7 +103,7 @@ augroup END augroup prose autocmd! - autocmd FileType tex,text,markdown + autocmd FileType tex,text,markdown,rst \ setlocal spell spelllang=en_us textwidth=80 augroup END " }}} @@ -171,4 +176,5 @@ nnoremap T :TagbarToggle iabbrev rr return iabbrev itt import cabbrev w!! w !sudo tee > /dev/null % +cabbrev ddf %:p:h " }}}