On Thu 21 Feb 2019 at 03:34:09 (-0700), foxfanfare wrote: > David Wright wrote > > Had you told us why vim is essential, as opposed to gvim? > > Because as far as I know, just configure in .bashrc export EDITOR="gvim" is > enough to get P&C working. You don't have to start server-mode, remote, etc. > It is really easier. For vim, you'd have to set-up correctly the LYEDITOR > variable which could be confusing (at least for me it is...)
I'm not sure how that answers my question, particularly writing "For vim, you'd have to …" because I thought you *were* using vim. > David Wright wrote > > Does that warp the mouse to the vim window? (I'm not familiar with i3.) > > No it doesn't but the window gets the focus and I can then directly write > into the file. Actually the whole purpose of using i3 is avoiding as much as > possible the use of the mouse and you could almost disable the trackpad. The > most important thing for me is the focus, not the fact my mouse jumps into > the vim file. OK, that's rather like SloppyFocus in fvwm, but fits a tiling WM better. As I use cascading windows rather than tiling, along with a large virtual workspace, it was possible to leave focus with a window that was out of sight, which I didn't like. I use the mouse/trackpad to determine which window has focus, but I don't have to click there¹ (or aim at any particular point) so that just shifting the mouse somewhere over the window is enough. > David Wright wrote > > Is this just opening the appropriate PDF when you press F6 in vim? > > Yes precisely. > > David Wright wrote > > What does it automate in the file manager? Opening the .ly file in > > vim, or opening the .pdf in zathura? > > This allows me to automatically open .ly files in the right server-name > instance of vim in order to get P&C working. I also have added an alias in > .bashrc in order to correctly edit the ly files when opening from a > terminal. But this solution forces users to have only one instance of vim > (with tabs) to edit all the LP files. You can't have several windows with ly > files and P&C working at the same time... OK, I can see that there's going to be some extra complexity to support that mode of working. I think the default model supports many PDFs → one Editor with multiple buffers (vim's tabs?), which would be my preference. With xpdf, it's trivial to support several editor instances with different servernames, but I don't know enough about zathura to make it do anything beyond its default behaviour (ie using GVIM). (All the docs seem geared towards supporting integration with LaTeX (synctex), which apparently handles point-and-click in both directions.) > David Wright wrote > > Here, you're double-clicking on a note and vim moves its cursor > > to the corresponding "b", right? > > Yes, exactly. But the ly file gets a bit messy because of the > lilypond-invoke-editor line. > > David Wright wrote > > Now I'm not sure why you need to start vim in the same xterm that > > started zathura. > > Actually, I wanted to configure my system that way: > 1. I open a ly file in order to edit it > 2. I f I want to visualize the output, I can simply open the corresponding > PDF in another window by directly pressing a shortcut (F6 was already > pre-configured by default) > 3. I can click on the PDF and the cursor goes at the right position in the > ly file. > > That is the reason why I call zathura from within vim. But I understand your > point and where the problem is. As zathura and vim are sharing the same > terminal, lilypond-invoke-editor message from zathura will appear in my vim > file... > > So it would seem a better way to configure that would be to set a shortcut > which first opens a new terminal and then launch zathura within... I'll try > to figure this out, right now I don't know how to achieve that... Assuming you're really not interested in any messages that zathura spits out, a simpler method might be to add 2>/tmp/zathura-log to your command that invokes zathura. For multiple instances, you need either 2>/tmp/zathura-log-<filename> or 2>>/tmp/zathura-log to allow multiple instances to write into distinct files or a shared file respectively. And, of course, there's always the alternative of 2>/dev/null. ¹ Not 100% true: I have windows like xconsole which don't react at all unless actually clicked on (Style ClickToFocus). Cheers, David. _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user