4

Currently it's C:\Windows\System32 which is pretty impractical. I know that you can change the current directory with :cd [directory], but is there any way to change the default save location for new files without having to change directories all the time?

2
  • maybe set TEMPDIR or TMPDIR, or switch to Linux! Commented Jan 2, 2014 at 16:52
  • the last option is always right. @BasileStarynkevitch Commented Jan 2, 2014 at 17:01

2 Answers 2

5

I am not at Windows so I cannot find the exact menu names and such, but if I recall correctly the easiest way to go about it is:

  1. Find your gVim application
  2. Right click it
  3. Choose Properties,
  4. Change the startup location in one of the tabs. The usual place to set it to would be your home directory.
Sign up to request clarification or add additional context in comments.

2 Comments

Actually the latest version of the Vim installer (as of 7.4.077) will create the Vim shortcuts to point to the user directory as the startup directory instead of a non-writable location. So this was acknowledged as an issue with the installer and fixed.
I don't think he implied he was using gVim.
4

You can change Vim's current working directory with the :cd command. See

 :help :cd 

.

If you want Vim to always start in a particular directory, you can put the :cd command in your ~/_vimrc file. If you want Vim to use the parent directory of the file you are editing as its current working directory, you can put this setting in your ~/_vimrc file: 

.

 set autochdir 

See

:help 'autochdir' 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.