My projects are all under /Users/username/workspace/my_project
where /Users/username/
is $HOME
.
I want macvim to always have the home as /Users/username/workspace/my_project
instead of /Users/username/
.
I understand set autochdir
sets the home to whatever the current file's directory is, but this is not what I want.
Also I'm using NerdTree if that helps.
Every command you run has its own current working directory. When you start a terminal emulator, your first cwd is your home directory ( /home/user on Linux, /Users/user on macOS, C:\\Users\user on Windows), and then you can use cd to change the working directory.
vimrc , and Vim files of current user are located inside ~/. vim/ . The global configuration file is located at /etc/vimrc . Global Vim files such as defaults.
Opening vimrc Using file name completion, you could type :e $M then press Tab until you see the desired variable. If you only want to see the path, type :echo $M then press Tab to see the variable, and press Enter. In gvim, the Edit menu includes "Startup Settings" which will use $MYVIMRC to edit your vimrc file.
Do you want Vim's working directory to be ~/my_project
?
Add cd ~/my_project
to your ~/.vimrc
.
Do you want all your plugins and colorschemes to be loaded from ~/my_project
, however silly it is?
See :help runtimepath
.
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