[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim
Subject:    another filesystem interface question
From:       Neil Zanella <nzanella () cs ! mun ! ca>
Date:       2004-03-21 19:10:56
Message-ID: Pine.LNX.4.44.0403211548010.24437-100000 () garfield ! cs ! mun ! ca
[Download RAW message or body]


Hello,

I would like to know, suppose I open a file with the command:

$ vim ../foo/bar/long-path/foobar.cpp

I do some edits and saves (:w) and then realize I want to issue a make
from within .../foo/bar/long-path. But I don't want to have to type the
extra cd command from the shell. Rather, I want to tell vim:

When I exit, leve me in the directory of the current file I am editing.
This directory should have some wildcard that stands for it, just like
% stands for the current file, in vim. Say this wildcard i @. I should
be able to issue something like:

:cd @

and then when I do the final (:q) or (:wq) or (ZZ) from vim it then
leaves me in the directory of the file I was editing.

Any ideas on how I can do this in a few keystrokes similar to what
I described here?

Thanks for your help!

Neil

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic