lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tips and Tricks on making Vim a good environment for Lilypond?


From: Martin Tarenskeen
Subject: Re: Tips and Tricks on making Vim a good environment for Lilypond?
Date: Tue, 22 Jan 2019 08:12:34 +0100 (CET)
User-agent: Alpine 2.21 (LFD 202 2017-01-01)



On Mon, 21 Jan 2019, Ivan Kuznetsov wrote:

I think that is because my lilypond installation
automatically puts the correct files in /usr/share/vim/ and so
lilypond syntax highlighting works immediately for me upon a new
OS installation.  But then, I use Fedora.  What OS do
you work under?

Hi,

I also use Fedora and vim.
I did a small modification of the file /usr/share/vim/vim81/ftplugin/lilypond.vim

-" <F6>  view pdf with ghostview
-map <buffer> <F6> :!gv --watch "%<.pdf" &<Return>
+" <F6>  view pdf with evince
+map <buffer> <F6> :!evince "%<.pdf" &<Return>

Evince is the standard PDF viewer for Gnome in Fedora and a more obvious choice than gv (ghostview). Maybe I should report/request that to the Fedora packagers?

Also since I personally prefer to use *.mid instead of *.midi as default file extension for midifiles and I like to use Timidity with a GUI I did the following modification:

 " <F4>  save & make and play midi with timidity
-map <buffer> <F4> :w<Return>:setl makeprg=lilypond\ \"%<\"<Return>:make<Return>:!timidity 
"%<.midi"<Return>
+map <buffer> <F4> :w<Return>:setl makeprg=lilypond\ -dmidi-extension=mid\ 
\"%<\"<Return>:make<Return>:!timidity -ig "%<.mid"<Return>
 "
 " <F5>  save & make
-map <buffer> <F5> :w<Return>:setl makeprg=lilypond\ \"%<\"<Return>:make<Return>
+map <buffer> <F5> :w<Return>:setl makeprg=lilypond\ -dmidi-extension=mid\ 
\"%<\"<Return>:make<Return>


These are lines that configure what happens if you hit the function keys F4, F5, F6 when using Vim to edit lilypond files.
The same plugin files also work when using gvim, the GUI version of vim.

At some point I even managed to make Point&Click work (sort of) for the combination Evince + Gvim. If I drag the Evince and Gvim to the left and right borders of the screen a nice split screen is organized that almost can compete with Frescobaldi. And for an experience Vim user this even works better than Frescobaldi.

(Don't misunderstand me: Frescobaldi is fantastic, but this thread is about Vim)

--

MT



reply via email to

[Prev in Thread] Current Thread [Next in Thread]