Re: What is %:h anyway? (was: Request for enhancement ...)
- --- Ricky Buchanan <rb@...> wrote:
> Jonathan D Johnston wrote:% of course is used to mean the complete pathname of the current buffer (:help
> > Tony, your explanation, as always, was very thorough, but I think Keith
> > may have been referring to the *combination* of a file command, such as
> > ":edit", *and* the use of "%:h". Unless I've missed an option or it was
> > implemented by a recent patch, something like
> > :e %:h/partialPath<Tab>
> > just generates a beep for me. "Normal" usage, such as,
> > :e partialPath<Tab>
> > works fine.
> Okay. I'm baffled (again). What's %:h do anyway? I can't find any
> help for it that's obvious, does it mean the current directory or
:_%). :h means just the head (everything but the filename) of the previous path
(:help filename-modifiers). So, %:h is the directory of the file in the current
California State University, Los Angeles
Yahoo: drisner; ICQ: 121265980; MSN: drisner@...; AIM: dgrisner
- Keith Roberts wrote:
> I don't know if this has been discussed before ... and I don't think it's inThis is in the todo list somewhere. It's not really easy to implement,
> the ToDo list (unless 'cmdline completion', item#7 refers to this) ...
> But I would like to have filename completion work for commands like
> :e %:h/string<Tab>
> Also :new, etc. In fact, any command which expects a filename.
> I'm sure the completion logic is subroutined somewhere, and I can't
> for the life of me imagine why it isn't already being employed here.
but certainly possible. I have situations myself where I need
completion of an item with % or #.
From "know your smileys":
*<|:-) Santa Claus (Ho Ho Ho)
/// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
/// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\
\\\ Project leader for A-A-P -- http://www.A-A-P.org ///
\\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///