show full file path in vim

This is a discussion on show full file path in vim within the Editors forums in Theory and Concepts category; Hi. I know how to see the name of the file I am currently editing in vim with control + g. But how can I see the full path of the file I am currently editing? Thanks in advance! John...

Go Back   Application Development Forum > Theory and Concepts > Editors

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-21-2008, 04:20 AM
John
Guest
 
Default show full file path in vim

Hi.

I know how to see the name of the file I am currently editing in vim
with control + g.

But how can I see the full path of the file I am currently editing?

Thanks in advance!
John
Reply With Quote
  #2  
Old 08-21-2008, 05:04 AM
Teemu Likonen
Guest
 
Default Re: show full file path in vim

John wrote:

> But how can I see the full path of the file I am currently editing?


At least this way:

:echo expand('%')

You can map it to a key you need it often.
Reply With Quote
  #3  
Old 08-22-2008, 12:02 AM
John Beckett
Guest
 
Default Re: show full file path in vim

John wrote:
>But how can I see the full path of the file I am currently editing?


1 Ctrl-G

And 2 Ctrl-G will also show the buffer number.

John2

Reply With Quote
  #4  
Old 08-22-2008, 02:51 PM
Teemu Likonen
Guest
 
Default Re: show full file path in vim

John Beckett wrote:

> John wrote:
>>But how can I see the full path of the file I am currently editing?

>
> 1 Ctrl-G
>
> And 2 Ctrl-G will also show the buffer number.


Below user's home directory these may show only related to $HOME so it's
prefixed with ~/ . I think that in many cases it's indeed "full enough
path" but if truly full right-from-the-root path must be guaranteed then
it seems that evaluating expand('%') is the only option.
Reply With Quote
  #5  
Old 08-22-2008, 07:19 PM
John Beckett
Guest
 
Default Re: show full file path in vim

Teemu Likonen wrote:
>> 1 Ctrl-G
>>
>> And 2 Ctrl-G will also show the buffer number.

>
>Below user's home directory these may show only related to $HOME so it's
>prefixed with ~/


Good grief - of course ... I'm so used to it I overlooked that.

John
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 07:28 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.