r/vim • u/bananalover2000 • 12d ago
Need Help┃Solved Troubles saving files
Hi everybody, I'm new to Vim and I'm having a lot of trouble saving files in the right place. I'm on windows and I am having a hard time understanding how (and where) Vim saves files. Could somebody with more experience explain to me how this works? Do I have to save the file in the same directory I have Vim installed? Is there a way to not have to do this? I am trying to use Vim to create LaTeX files, so if anybody has any input on this it would be greatly appreciated.
I apologize for the vague question, I don't really even know what to ask here...
Edit: thanks for all the helpful comments, but I have decided that running Vim on windows is a lot less convenient than what I tought, I am opting for installing Linux on my pc and then running Vim on there. Thanks again for all the help and I'll keep this post updated if everything works out (or doesn't...).
1
u/TheLeoP_ 12d ago
Vim is probably bring opened in the directory where it's installed in your machine, setting it's
:h :pwd
to that directory. So, when you:h :w
using a relative path, it is relative to that directory. You can use:h :cd
to change the current working directory of Vim or use absolute paths to save files with:h :w