added vim linting for json and yaml

This commit is contained in:
Stefan Friese 2022-01-20 18:23:29 +01:00
parent d0bc21397d
commit f342cded6d
1 changed files with 9 additions and 4 deletions

View File

@ -1,12 +1,15 @@
set runtimepath^=~/.vim/bundle/ctrlp.vim
set runtimepath^=~/.vim/bundle/nerdtree
"set runtimepath^=~/.vim/bundle/ctrlp.vim
"set runtimepath^=~/.vim/bundle/nerdtree
set nocompatible
set relativenumber
syntax on
filetype plugin on
set tabstop=4 shiftwidth=4 expandtab
set number
set hlsearch
"set relativenumber
"folding
set foldenable foldlevelstart=20 foldmethod=indent
" finding files
set path+=**
@ -17,7 +20,9 @@ command! MakeTags !ctags -R .
" linter
autocmd FileType python setlocal makeprg=pylint\ --output-format=parseable
autocmd BufWritePost *.py silent make! <afile> | silent redraw!
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 makeprg=yamllint\ --f\ parsable\ %
autocmd FileType json autocmd BufWritePre <buffer> %!python -m json.tool 2>/dev/null
autocmd BufWritePost *.py,*.yaml,*.yml silent make! <afile> | silent redraw!
autocmd QuickFixCmdPost [^l]* cwindow
" file browsing