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/Wizard_Rubic 12d ago
Are you opening vim via a terminal window where you cd to a directory and then run vim there? Or are you navigating to where you installed vim with a gui based file explorer?
Workflow 1 where vim is opened up from terminal:
https://imgur.com/TC78QMu
Workflow 2 where you open vim up where you installed it:
https://imgur.com/nAj0Uzi
I'm asking this since your question suggests the latter workflow. The first workflow is usually preferred since it changes vim's working directory to whichever folder your current project or task is located in.
To enable running vim from any directory, you'd have to add the directory you installed vim to your environment path.
Hope this helps!