From 86721731c740d0ea07e6b90e601a80770c3d9f36 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Tue, 5 Mar 2019 09:34:59 +0100 Subject: Add lilypond support, closes #278 --- ftplugin/lilypond.vim | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 ftplugin/lilypond.vim (limited to 'ftplugin') diff --git a/ftplugin/lilypond.vim b/ftplugin/lilypond.vim new file mode 100644 index 00000000..b755a6bb --- /dev/null +++ b/ftplugin/lilypond.vim @@ -0,0 +1,61 @@ +if exists('g:polyglot_disabled') && index(g:polyglot_disabled, 'lilypond') != -1 + finish +endif + +" LilyPond filetype plugin +" Language: LilyPond (ft=ly) +" Maintainer: Heikki Junes +" Last Change: 2010 Jul 26 +" +" Installed As: vim/ftplugin/lilypond.vim +" Uses Generated File: vim/syntax/lilypond-words.vim +" +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +" Don't load another plugin for this buffer +let b:did_ftplugin = 1 + +setlocal autoindent +setlocal shiftwidth=2 +" +" some handy key mappings +" +" save & make and play midi with timidity +map :w:se makeprg=lilypond\ \"%<\":make:!timidity "%<.midi" +" +" save & make +map :w:se makeprg=lilypond\ \"%<\":make +" +" view ps with ghostview +map :!gv --watch "%<.ps" & +" +" prev error +map :cp +" +" next error +map :cn +" +" make +map :w:se makeprg=make\ -k:make +" +" menu +source $VIMRUNTIME/menu.vim +setlocal wildmenu +setlocal cpo-=< +setlocal wcm= +map :emenu +" +" comment region +map :g!/%.*/normal 0i% +" +" remove comments in region +map :g/%.*/normal 0x +" +" Completions in Insert/Replace-mode with +setlocal dictionary-=$VIM/syntax/lilypond-words dictionary+=$VIM/syntax/lilypond-words +setlocal complete-=k complete+=k +" +setlocal showmatch -- cgit v1.2.3