1

So, this is similar to ‘execute command with range silently’; but that's in a mapping, and so the solution isn't applicable to what I'm trying to do.

I'm using the Skim PDF-viewer with LaTeX Sync, and a command like the following to jump to a corresponding line in a MacVim instance:

mvim --remote-silent +":%line;foldo!" "%file"

Unfortunately, this prints “E490: No fold found” most of the time. In trying to silence that error, though, with +":%line;silent! foldo!", I'm running into another: “E481: No range allowed”.

I've also tried try | foldo! | endtry and similar; but all approaches I've found fail to pass the range into the foldopen! call. Is there a way for me to do this?

1 Answer 1

2

Ah, lord, somebody in #vim on Freenode helped me out: that line going around is bugged, because ; doesn't mean subsequent-command in Vim.

The following works as intended:

mvim --remote-silent +":%line | silent foldo!" "%file"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .