when I open gvim using Alt+F2 it takes as its default working directory my home folder.
How can I change the working folder after or while running gvim? can i pass that folder as a parameter when open gvim?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use a shortcut.
The simplest way, though, would be to
append a line
save (optionally execute
:w|source %to immediately reload)Inside vim
use
To view/change current working directory.
Use e.g.
to change to the directory containing the file loaded in the active window.
If you need/want to do this often, consider just setting ‘autochdir’
From the docs: