Add LilyPond to vimrc and autocmds for .ly files

This commit is contained in:
flyingscorpio@pinebookpro 2021-08-15 09:21:00 +02:00
parent acdf635b48
commit cc2409ebab

View file

@ -84,6 +84,8 @@ Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'Yggdroot/indentLine'
" VimTeX
Plug 'lervag/vimtex'
" LilyPond
Plug 'sersorrel/vim-lilypond'
call plug#end()
" }}}
@ -193,6 +195,10 @@ augroup configgroup
autocmd BufWritePre * :StripWhitespace
" Run Flake8 on write in python files
autocmd BufWritePost *.py call flake8#Flake8()
" Open pdf after entering .ly file for side-by-side
autocmd VimEnter *.ly ![ -f ./%:r.pdf ] && zathura %:r.pdf &
" Run lilypond after save on .ly files
autocmd BufWritePost *.ly !lilypond %
" Run make clean when leaving a LaTeX file if Makefile exists in directory
"autocmd VimLeave *.tex ![ -f ./Makefile ] && make clean