How to show the file path opened in VIM

2

Sometimes I leave the file open for a long time, and I do not know which directory it is in, because the environment of my application is separated by path.

Ex:

prod 
/loja/prod/app/index.php
teste
/loja/teste/app/index.php

I wanted to show this path with VIM. Is it possible and how?

    
asked by anonymous 04.10.2014 / 00:15

3 answers

3

Type:

:set statusline+=%F
:set laststatus=2

Or, to leave permanent, put the lines below in your ~ / .vimrc

set statusline+=%F
set laststatus=2

Source: link

    
06.10.2014 / 13:45
0

You can execute an external command by vim with the :! comando syntax. The pwd command returns the directory you are in. Logo:

:! pwd

    
04.10.2014 / 01:13
0

In normal mode press 1 Ctrl-g

    
08.03.2018 / 20:36