Re: --remote-tab-silent working with "+" on the command-line?
- -----BEGIN PGP SIGNED MESSAGE-----
On 29/02/2012 18:54, björn wrote:
> On 28 February 2012 20:05, Drew wrote:
>> I would like to always open files in tabs in mvim so I am using --
>> remote-tab-silent. I would also, on occasion I would also like to jump
>> to a certain line number in that file.
>> When I use this command, it actually opens a buffer for "+" and
>> "somefile" in a split window:
>> mvim --remote-tab-silent somefile +
>> When I move the "+", it just gets ignored and it just opens the file
>> at line 1:
>> mvim + --remote-tab-silent somefile
>> Is there a way to force the file to open in a new tab, and specify
>> what line to jump to?
> Hmmm....I can't get + to work with --remote either and I don't
> actually know if it is supposed to work (has anybody got access to
> win/linux to test?).
> Take a look at ":h remote" though; it mentions that you can pass
> commands with --remote by putting a + in front of it. Something like
> this should serve your purposes:
> mvim --remote-tab-silent +999 filename
> (This will put the cursor on line 999 [or the last line if the file is
> shorter than that] -- you can't leave the number out to go to the last
> line however.)
on gvim (Debian Squeeze 6.0.4), `mvim --remote-tab-silent +999 filename`
opens gvim with `filename` at line 999 (this particular file is 1238
lines long) but in its normal window instead of a new tab (this could be
something to do with NERDTree being set to open on startup though).
Specifiying anything more than 999 gets an `E16: Invalid range`.
But masters, remember that I am an ass.
Though it be not written down,
yet forget not that I am an ass.
Wm. Shakespeare - Much Ado About Nothing
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: Ā§auto-key-locate cert pka ldap hkp://keys.gnupg.net
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php