-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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`. Cheers, Phil... - -- 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/ iQEcBAEBAgAGBQJPTptAAAoJEKpMeDHWT5ADiD0IAJSidpck/PkeNLYRtyJyqBXf grO7PXdb99GXM847rI0h7sb1tXaz8HcFp/JaQkBgxXfQHIkTvQYHr6IHeQGBnvoW 6wyrEY/nijGWxuNtNRI/NEaLw9H4vO3Ow3ujO29h2P8T6vXC4rcZvD86zjUfIPvH 27Ye+8wLb1QalY2Iy7lWCo06NS3sf1BGANPi3vvw9naX/ujKE5MNLGeCooELpnGA CaToLxMoNcftvDknPD0N1cwSrcxeiC0xgg7DvS2JZAdGkyF2V4+6RSAryR3u45e1 X3K8IUgxIsnbpHwn3Gln/P9waoHM2sMELi8XOS44Ey3OVaz+tfT37hxAFXs/yKU= =k8Kz -----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