madiyaan wrote:
> For example, I am in project/ and I invoke:
> 
> vim lib/tools/tool1.cpp
> 
> I don't want to change my directory to project/lib/tools/ 
> because when I invoke :!make, it will use the Makefile in 
> project/lib/tools/ and not the one that I intend to use, 
> which lies in project/. I am wanting to know whether I can 
> easily open up project/lib/tools/tool2.cpp without typing in 
> the entire path.

Use the following:
  :help filename-modifiers

You can do whatever you want with the above. For example, to open another file 
that
is in the same directory as the current file (not the current directory):

:e %p:h/tool2.cpp

It is sometimes useful to use # instead of % (% = current file; # = alternate 
seen
with Ctrl-^).

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to