Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VIM: Variable, or other reference, to the filename being edited

0 views
Skip to first unread message

Andrew Falanga

unread,
Mar 1, 2007, 11:14:32 AM3/1/07
to
Hi,

Is there a way to easily get the name of the file that is being edited
in the active buffer? Something that can be used in vim scripts, etc.

Thanks,
Andy

Ben C

unread,
Mar 1, 2007, 11:24:30 AM3/1/07
to

The @% register, and also "cmdline special character" %, which can be
used in scripts with expand("%"), or expand("%:p") etc. with modifiers.

0 new messages