How can I bring up the path to the current file in the command line, so as to type a similar file name? I don't want an abbreviation that would be replaced by the current file name, I want to edit the file name, complete with its directory path. For example, I want to :edit
a file with a similar name, or in a similar directory, e.g.
vim src/submodule/frontend/frobnicate2.c
and now I want to edit ../trunk/src/submodule/frontend/frobnicate.c
, and I only want to insert the ../trunk
and remove the 2
, not retype the full path.
I can of course drop back to the shell and use its command history, or I could copy-paste the path through the GUI, but I'm looking for a more efficient way that doesn't require leaving Vim.