Vim: Change start up directory?

Nope picture Nope · Jul 25, 2009 · Viewed 19.4k times · Source

When I start GVim and start writing my little program I'd like to save the file to the Desktop but it seems that Vim is starting the command line in:

C:\Windows\System32

How would I go about changing that to:

C:\Users\Casey

so then I could just:

:w Desktop\my_program.py

Thank you

Answer

Alex Martelli picture Alex Martelli · Jul 25, 2009

Assuming you're starting gvim from an icon/shortcut in Windows (from the kind of paths you supply), you can change the starting directory (completely independent from the fact that it IS gvim: it would be the same from any other app!) by editing the "starting directory" property of that Windows icon/shortcut.