1 " LilyPond filetype plugin
2 " Language: LilyPond (ft=ly)
4 " Installed As: vim/ftplugin/lilypond.vim
5 " Uses Generated File: vim/syntax/lilypond-words.vim
7 " Only do this when not done yet for this buffer
8 if exists("b:did_ftplugin")
12 " Don't load another plugin for this buffer
13 let b:did_ftplugin = 1
18 " some handy key mappings
20 " <F4> save & make and play midi with timidity
21 map <buffer> <F4> :w<Return>:se makeprg=lilypond\ \"%<\"<Return>:make<Return>:!timidity "%<.midi"<Return>
24 map <buffer> <F5> :w<Return>:se makeprg=lilypond\ \"%<\"<Return>:make<Return>
26 " <F6> view pdf with ghostview
27 map <buffer> <F6> :!gv --watch "%<.pdf" &<Return>
30 map <buffer> <F7> :cp<Return>
33 map <buffer> <F8> :cn<Return>
36 map <buffer> <F9> :w<Return>:se makeprg=make\ -k<Return>:make<Return>
39 source $VIMRUNTIME/menu.vim
43 map <buffer> <F10> :emenu <C-Z>
45 " <F12> comment region
46 map <buffer> <F12> :g!/%.*/normal 0i%<Return>
48 " <S-F12> remove comments in region
49 map <buffer> <S-F12> :g/%.*/normal 0x<Return>
51 " Completions in Insert/Replace-mode with <Ctrl-N>
52 setlocal dictionary-=$VIM/syntax/lilypond-words dictionary+=$VIM/syntax/lilypond-words
53 setlocal complete-=k complete+=k