Hi Kamaraju,
2016-11-11(Fri) 13:21:46 UTC+9 kamaraju kusumanchi:
> On Thu, Nov 10, 2016 at 1:06 AM, JohnBeckett wrote:
> > On Thursday, November 10, 2016 at 4:28:05 PM UTC+11, kamaraju kusumanchi wrote:
> >> When I do <CTRL-g>, vim prints the filename as "foo" . Is it possible
> >> to print the full path of the file (ex:- /home/user/foo ) instead?
> >
> > Press 1 then Ctrl-g. It shows the user home directory as "~", but apart from that, it shows the full path.
> >
>
> Thanks. Ideally, I want the '~' to be expanded as well. But if that is
> the best we can do, I will take it. I can do it by using external
> programs such as
>
> :!realpath %
>
> But was hoping if it can be done with pure vim.
How about this one?
:echo expand("%:p")
--
Best regards,
Hirohito Higashi (a.k.a. h_east)
--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment