Re: Tips and Tricks on making Vim a good environment for Lilypond?
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 -" view pdf with ghostview -map :!gv --watch "%<.pdf" & +" view pdf with evince +map :!evince "%<.pdf" & 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: " save & make and play midi with timidity -map :w:setl makeprg=lilypond\ \"%<\":make:!timidity "%<.midi" +map :w:setl makeprg=lilypond\ -dmidi-extension=mid\ \"%<\":make:!timidity -ig "%<.mid" " " save & make -map :w:setl makeprg=lilypond\ \"%<\":make +map :w:setl makeprg=lilypond\ -dmidi-extension=mid\ \"%<\":make 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 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 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tips and Tricks on making Vim a good environment for Lilypond?
Mason Hock writes: > > I use vim for everything except large Lilypond projects that consist of > multiple input files. The ability to click on an object in the score and > jump to that place in the code, even if the file containing that code is > not open, outweighs for me vim's advantages as a text editor, but I also > have not spent much time trying to come up with an alternative solution > in vim. How do you angle this. Well, so far I have just used Lilypond for solo guitar music, and duets including guitar, so perhaps I have not begun to work on projects that are considered large. > I'd be interested to see one of your Makefiles. They are no big deal, I am sure. An example: ### all: panfan-entire.pdf wav: panfan-entire.wav clean: /bin/rm -f *.pdf *.wav *.midi panfan-entire.pdf: \ panfan-entire.ly \ panfan-include.ly \ panfan-sec01.ly \ panfan-sec02.ly \ panfan-sec03.ly \ panfan-sec04.ly \ panfan-tempo-sec01.ly \ panfan-tempo-sec02.ly \ panfan-tempo-sec03.ly \ panfan-tempo-sec04.ly lilypond panfan-entire.ly panfan-entire.wav: panfan-entire.midi timidity -A200 -Ow -o panfan-entire.wav panfan-entire.midi ### Makefile Description: Binary data ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tips and Tricks on making Vim a good environment for Lilypond?
On 01/21, Ivan Kuznetsov wrote: > I have looked at Frescobaldi, but once one is fluent > with a Unix editor (which means vim or emacs) > Frescobaldi and other third party tools are > _not_ a time saver. I use vim for everything except large Lilypond projects that consist of multiple input files. The ability to click on an object in the score and jump to that place in the code, even if the file containing that code is not open, outweighs for me vim's advantages as a text editor, but I also have not spent much time trying to come up with an alternative solution in vim. How do you angle this. > You ask about workflow though, and apart from > a xterm where I am using vim, a PDF viewer which > automatically reloads an updated file, and a > Makefile, I don't know that there is anything > to offer you. I'd be interested to see one of your Makefiles. > I have the above template in a separate file, we will say > this file is called "v.ly", and when I need this template > I execute in vim: > > :r v.ly Nice. Mason signature.asc Description: PGP signature ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tips and Tricks on making Vim a good environment for Lilypond?
I am a lifelong vim user and I cannot imagine any other way to enter or manipulate text, be it for web pages, documents (which I create with Latex) or lilypond. I have looked at Frescobaldi, but once one is fluent with a Unix editor (which means vim or emacs) Frescobaldi and other third party tools are _not_ a time saver. You ask about workflow though, and apart from a xterm where I am using vim, a PDF viewer which automatically reloads an updated file, and a Makefile, I don't know that there is anything to offer you. Here is a tip, which may be obvious to most, but I will go ahead and list it here. I have a few small template-files. For example, I mostly write contrapuntal guitar music, and here is something that I pretty much use in almost every measure of what I code in lilypond: << { \voiceOne } \context Voice = "vtwo" { \voiceTwo } >> \oneVoice I have the above template in a separate file, we will say this file is called "v.ly", and when I need this template I execute in vim: :r v.ly You ask about syntax highlighting. I use to get lilypond syntax highlighting to work in vim by having the following line in my .vimrc file: set runtimepath+=/usr/local/share/lilypond/current/vim/ but I see for the last several years, I have had that line commented out. 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? ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Tips and Tricks on making Vim a good environment for Lilypond?
On 1/21/19, Rue wrote: > I don't actually have this path. What I have is > "/usr/share/lilypond/2.19.82/", but there's no vim folder though. If you’ve installed LilyPond through your distribution’s packages, then the relevant files should have already been put in /usr/share/vim/, e.g. ~: find /usr/share/vim/ -name lilypond* /usr/share/vim/vim81/compiler/lilypond.vim /usr/share/vim/vim81/ftdetect/lilypond.vim /usr/share/vim/vim81/ftplugin/lilypond.vim /usr/share/vim/vim81/indent/lilypond.vim /usr/share/vim/vim81/syntax/lilypond-words /usr/share/vim/vim81/syntax/lilypond-words.vim /usr/share/vim/vim81/syntax/lilypond.vim I remember using LilyPond’s vim mode quite a bit a dozen years ago; syntax highlighting did work but I was not an advanced Vim user enough to take advantage of all the other niceties. Please let us know if you’re happy with it! Cheers, V. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user