Great, this works.

Another question, ":tabe %" can open the same file, is there an easy way to open another file which locates in the same or very similar directory of the current file?

For example, I am viewing f2 now, and I want to open f3 which is of same directory of f2 and to open f4 whose path is <f2 location>/../i/f4.

Any trick to do this?


From: Taylor Venable <[EMAIL PROTECTED]>
To: "lin q" <[EMAIL PROTECTED]>
CC: [email protected]
Subject: Re: how to open an already opened file into an new tab?
Date: Tue, 8 May 2007 17:54:57 -0400

On Tue, 08 May 2007 15:45:40 -0600
"lin q" <[EMAIL PROTECTED]> wrote:

>   This causes that on the tabline, the full path of f2 shows after
> some abbreviation. Now I want to open f2 into another tab, but I do
> not find an easy way to do that.
>
>   If use :tabe, I need to type in the full path of f2, for my case,
> it is very long.

You can substitute the full path of the current file with the character
"%" in an ex-command.  So, assuming you're already viewing f2, you can
do the following:

:tabe %

And it will re-open the current file in another tab.

--
Taylor Venable
[EMAIL PROTECTED]
http://www.metasyntax.net/

_________________________________________________________________
PC Magazine’s 2007 editors’ choice for best Web mail—award-winning Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_pcmag_0507

Reply via email to