- At 02:11 PM 8/17/00, Robert Link wrote:
>-----BEGIN PGP SIGNED MESSAGE-----Are you writing as a developer or a user?
>How can I open a file from the command line without typing the entire
>path name? I'm using vimppc 5.7.9 on a revC iMac, sys8.5.1. If
>there's a good faq for this kind of thing, feel free to point me to
I guess that
is not doing what you want or what you expect.
Is there a variety of
:browse confirm e
that could help you at least temporarily?
Mac applications should have a 'working directory' & there are details
in Inside Mac on how to manipulate it using old and new calls. This is not
a perfect system as the Mac identifies files using alias records or
a volume/DirID/File triple.
Leedsnet - The information resource for Leeds and the West Riding
< URL:http://www.leedsnet.com/ >
- Thanks to Benji, Eugene and Nils!
:cd to the desired working directory works fine, at least when all the
needed files are in one directory. I didn't think to try it, I think this
was because I don't think of that as something vim does, but rather as
something bash does---perhaps I'm a bit over my head technically. Tab
completion also works fairly well. As for the drag-and-drop, I have an
icon on my desktop for just that reason, but my whole love for vi(m) is
avoiding the mouse, keeping my fingers on their appointed keys.
I'd be interested to try the Tcl mentioned by Eugene and the utility
metnioned by Benji.
- Quoting Eugene Lee (eugene@...):
> Command lines don't exist on a regular Mac system. I've played with aWell, once again time to mention MPW, I guess :-)
> Tcl shell from the Mac Tcl/Tk distribution that offers a few functions
> for a very *very* basic shell, but nothing like a modern Unix shell.
But you're right, on a regular Mac there is no MPW installed...
The MPW scripting language offers about the same features as a
Bourne shell on a Unix machine. The command names differ and
for certain features MPW makes use of special characters present
in the Mac character encoding...
I don't think MPW offers a proper terminal emulation to the tools
otherwise having an adaption of vim as an MPW tool would be a
very weird but probably even useful thing to have :-)
(Keep in mind that MPW is a combination of an editor and a
command line with scripting. It might be compared somewhat to
emacs if your scripting and command line language was lisp...)
> Now if you wanna open a text file with Vim whose file creator isn't setWell, wouldn't it be straightforward (from a user's point of view)
> to "VIM!", the easiest thing to do is to drag your text file onto the
> VimPPC icon directly, or indirectly on an alias or a launcher app.
if Vim would take the file's directory as the current directory if
Vim is started by drag'n'drop ?
H. Eckert, 10777 Berlin, Germany, http://me.in-berlin.de/~nostromo/
ISO 8859-1: Ä=Ae, Ö=Oe, Ü=Ue, ä=ae, ö=oe, ü=ue, ß=sz.
"(Technobabbel)" (Jetrel) - "Müssen wir uns diesen Schwachsinn wirklich
> How can I open a file from the command line without typing the entireDo you want to open the file from the MPW commandline or from the Vim
> path name? I'm using vimppc 5.7.9 on a revC iMac, sys8.5.1. If
> there's a good faq for this kind of thing, feel free to point me to
> it. Thanks!
On the Vim commandline you can cd to the path of the current document,
after that :e looks in this folder and below.
You can use an autocommand like the one shown im macvimrc:
autocmd VimEnter * if strlen(@%) != 0 | cd %:p:h | endif
There is nothing left to try
There is nothing left to choose
There is no greater power
Then the power of VI
- * Robert Link <rlink@...> [000817 13:11]:
> How can I open a file from the command line:e file workdir filename
> without typing the entire path name?
:e ../dir/file relative filename
:e /path/dir/file absolute filename
> I'm using vimppc 5.7.9 on a revC iMac, sys8.5.1.:help editing.txt
> If there's a good faq for this kind of thing,
> feel free to point me to it.
On Sat, Aug 19, 2000 at 01:11:54AM +0200, H. Eckert wrote:
: Quoting Eugene Lee (eugene@...):
: > Now if you wanna open a text file with Vim whose file creator isn't set
: > to "VIM!", the easiest thing to do is to drag your text file onto the
: > VimPPC icon directly, or indirectly on an alias or a launcher app.
: Well, wouldn't it be straightforward (from a user's point of view)
: if Vim would take the file's directory as the current directory if
: Vim is started by drag'n'drop ?
Actually, I've modified my .vimrc so that when Vim starts up with a
file, it also changes to that file's directory. If it starts up without
a file, then it changes to the desktop folder/directory.
> rlink@... (Robert Link) wrote:File name completion has problems when there is a space in the path.
> > How can I open a file from the command line without typing the entire
> > path name? I'm using vimppc 5.7.9 on a revC iMac, sys8.5.1. If
> You can :cd to your work directory, e.g.
> :cd Macintosh HD:Desktop Folder
> File name completion via Tab works fine for me, at least in
> the current directory.
But you can always use
to get a file-selector.