From cc2409ebab3f1fb360a8d027361095ae1861387f Mon Sep 17 00:00:00 2001 From: "flyingscorpio@pinebookpro" Date: Sun, 15 Aug 2021 09:21:00 +0200 Subject: [PATCH] Add LilyPond to vimrc and autocmds for .ly files --- dotfiles/vim/vimrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dotfiles/vim/vimrc b/dotfiles/vim/vimrc index 91a8c4c..baf6cdb 100644 --- a/dotfiles/vim/vimrc +++ b/dotfiles/vim/vimrc @@ -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