vim .
I have renamed some folders in current directory(.).
Now how can I refresh this directory in vim?
The command you want is :e (short for :edit ). If you use :edit! it will discard local changes and reload. You can also have vim do this automatically with set autoread in your vimrc.
Select a file or directory name and press Enter to open that file or directory. (For example :e /home/user displays the contents of that directory.) To return to the explorer window, press Ctrl-^ (usually Ctrl-6). You can also "edit" a directory to explore that directory.
You can use Ctrl - O to go back to the previous buffer.
You can use the command :edit
to reload the current file/dir listing.
From the docs:
To refresh either a local or remote directory listing, press ctrl-l (<c-l>) or hit the <cr> when atop the ./ directory entry in the listing. One may also refresh a local directory by using ":e .".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With