From: Heikki Junes Date: Mon, 1 Mar 2004 11:18:02 +0000 (+0000) Subject: apply bindings only locally. X-Git-Tag: release/2.1.29~36 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=7d10413001785107950eb42ee7c4620a848aefda;hp=1e8a5690d455200aa37b6621491bfef362baf3a5;p=lilypond.git apply bindings only locally. --- diff --git a/ChangeLog b/ChangeLog index 2e1867198f..4e4e0d3122 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,7 @@ * vim/ftplugin/lilypond.vim: new, renamed file (see prev). * vim/ftplugin/lilypond.vim: change dir for dictionary. + add header. apply bindings only locally. * Documentation/topdocs/INSTALL.texi: give easier orders. diff --git a/vim/ftplugin/lilypond.vim b/vim/ftplugin/lilypond.vim index 7568025451..67afd28bc1 100644 --- a/vim/ftplugin/lilypond.vim +++ b/vim/ftplugin/lilypond.vim @@ -1,48 +1,54 @@ -:version 6.1 +" LilyPond filetype plugin +" Language: LilyPond (ft=ly) +" Maintainer: Heikki Junes +" Last Change: 2004 March 1 + +" 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 + set autoindent set shiftwidth=2 " " some handy key mappings " -" save and go to previous buffer -map :w:bp -" -" save and go to next buffer -map :w:bn -" " save & make and play midi -map :w:se makeprg=lilypond\ -m\ %<:make:!timidity %<.midi +map :w:se makeprg=lilypond\ -m\ %<:make:!timidity %<.midi " " save & make dvi, midi, ps -map :w:se makeprg=lilypond\ %<:make +map :w:se makeprg=lilypond\ %<:make " " view ps -map :!gv -watch %<.ps & +map :!gv -watch %<.ps & " " view dvi -map :!xdvi %<.dvi & +map :!xdvi %<.dvi & " " prev error -map :cp +map :cp " " next error -map :cn +map :cn " " make -map :w:se makeprg=make\ -k:make +map :w:se makeprg=make\ -k:make " " menu :source $VIMRUNTIME/menu.vim :set wildmenu :set cpo-=< :set wcm= -:map :emenu +:map :emenu " " comment region -map :g!/%.*/normal 0i% +map :g!/%.*/normal 0i% " " remove comments in region -map :g/%.*/normal 0x +map :g/%.*/normal 0x " " Completions in Insert/Replace-mode with set dictionary-=~/.vim/syntax/lilypond.words.el dictionary+=~/.vim/syntax/lilypond.words.el