I use gvim to edit my tex files and it is the default editor. So I just double click on the tex files to edit them and that opens them with Gvim. However, the working directory for Gvim is always the home directory which is odd since I would expect the working directory to be the one in which the file that I have just double-clicked and opened is present. This causes a lot of inconvenience since I normally want to run commands in that directory in Gvim and I have to manually change it every time. Any suggestions on how I can have Gvim starting in the proper way? Thanks a lot in adcvance.
I have already checked the
.gvimrc file and I see nothing suspicious. It just has my font and color settings, that's all.