minor convenience tweaks

This commit is contained in:
2018-05-23 12:55:22 +02:00
parent dcfbdd871b
commit 897b79118d
3 changed files with 17 additions and 7 deletions

2
ftplugin/python.vim Normal file
View File

@@ -0,0 +1,2 @@
iabbrev <buffer> inp import numpy as np
iabbrev <buffer> ipl import matplotlib.pyplot as plt

View File

@@ -7,7 +7,8 @@ let s:comment_map = {
\ 'vim': '"', \ 'vim': '"',
\ 'tex': '%', \ 'tex': '%',
\ 'plaintex': '%', \ 'plaintex': '%',
\ 'sh': '#' \ 'sh': '#',
\ 'make': '#',
\ } \ }
let s:block_map = { let s:block_map = {
@@ -28,7 +29,8 @@ function! MyCommenter(uncomment) range
endif endif
let search_range = a:firstline . ',' . a:lastline 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' execute search_range . 's/\(^\s*\)\(' . comment . '\s*\)\+/\1/e'
if !a:uncomment if !a:uncomment
" Comment " Comment

View File

@@ -50,6 +50,7 @@ set langmenu=en_US.UTF-8
" Tagbar stuff " Tagbar stuff
" {{{ " {{{
let g:tagbar_autofocus = 1 let g:tagbar_autofocus = 1
let g:tagbar_map_close = "qT"
" }}} " }}}
" LatexBox stuff " LatexBox stuff
@@ -57,7 +58,7 @@ let g:tagbar_autofocus = 1
let g:LatexBox_no_mappings = 1 let g:LatexBox_no_mappings = 1
let g:LatexBox_quickfix = 2 let g:LatexBox_quickfix = 2
let g:LatexBox_build_dir = 'build' 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 " YouCompleteMe stuff
@@ -67,15 +68,19 @@ let g:ycm_autoclose_preview_window_after_completion = 0
let g:ycm_filetype_blacklist = { let g:ycm_filetype_blacklist = {
\ 'tex': 1, \ 'tex': 1,
\ 'markdown': 1, \ 'markdown': 1,
\ 'text': 1 \ 'text': 1,
\ 'rst': 1,
\ } \ }
set shortmess+=c set shortmess+=c
" }}} " }}}
" Syntastic Stuff " Syntastic Stuff
" {{{ " {{{
let g:syntastic_mode_map = {'mode': 'passive'} let g:syntastic_mode_map = {
" let g:syntastic_aggregate_errors = 1 \ 'mode': 'passive',
\ 'active_filetypes': ['python']
\}
let g:syntastic_python_checkers = ['python', 'pyflakes']
" }}} " }}}
" Coding style " Coding style
@@ -98,7 +103,7 @@ augroup END
augroup prose augroup prose
autocmd! autocmd!
autocmd FileType tex,text,markdown autocmd FileType tex,text,markdown,rst
\ setlocal spell spelllang=en_us textwidth=80 \ setlocal spell spelllang=en_us textwidth=80
augroup END augroup END
" }}} " }}}
@@ -171,4 +176,5 @@ nnoremap <leader>T :TagbarToggle<cr>
iabbrev rr return iabbrev rr return
iabbrev itt import iabbrev itt import
cabbrev w!! w !sudo tee > /dev/null %<cr> cabbrev w!! w !sudo tee > /dev/null %<cr>
cabbrev ddf %:p:h
" }}} " }}}