lilypond-user
[Top][All Lists]
Advanced

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

Re: Configuration Point & Click


From: foxfanfare
Subject: Re: Configuration Point & Click
Date: Wed, 20 Feb 2019 10:51:31 -0700 (MST)

Hi everybody,

I didn't take the time to update the thread earlier because of intense
working, but I wanted to write a little more about the issue and the
solution that worked. I hope this could help some people who wants to make a
working environment for LP between VIM and zathura. BTW everything seems to
work "out of the box" with gvim, things get more complicated with vim.

The solution of using vim in servermode was right, I just didn't configure
it well between, remote and server-mode... So here's what I put in my
.vimrc:

  export EDITOR="vim"
  export LYEDITOR="vim --servername LP --remote-tab-silent '+call
cursor(%(line)s, %(column)s)' %(file)s && wmctrl -a LP && exit"

This solution needs to edit lilypond files in a named vim instance (here
LP), that's why I use --remote-tab-silent in order to open new files without
errors in the same instance. I also installed wmctrl in order to focus the
ly file after clicking on the link in the PDF.

In usr/share/vim/vimfiles/ftplugin/lilypond.vim

" <F6>  view pdf with zathura 
map <buffer> <F6> :!zathura "%<.pdf" &<Return>:!wmctrl -a LP<Return><Return>

This opens the PDF and then focus the original file.

The .ly file must be called the servername LP then. For those using file
browser ranger, here's the line I've added to automate things:

ext ly = vim --servername LP --remote-tab-silent "$@"

And the the result in action.
<http://lilypond.1069038.n5.nabble.com/file/t5604/27.png> 
 
There's still a lot of things to configure, but now Point & Click is working
as expected. The only little "problem" I couldn't solve, is that when
calling lilypond-invoke-editor, it returns a little message with the current
LilyPond version. And this message appears in the vim file which is a bit
annoying... You can see this in the screenshot. I have to refresh the
terminal in vim (ctrl+l) in order to get rid of this message and wasn't able
to find the solution for this. I don't know if there is a way to call
lilypond-invoke-editor silently? If someone has an idea I would be
interested!

I also still have to figure how to use correctly the auto-completion. In
lilypond.vim it is set with a shortcut (ctrl+n), but this works only with
words that are already written in the file... Does someone knows how to
configure vim in order to have the access of the whole LP syntax and make
suggestions like in frescobaldi?



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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