I am using gvim. I have checked the location of the RUNTIMEFILE with :echo $RUNTIMEFILE and found that is is located in c:\Programme\vim\vim82.

The file _gvimrc is there indeed. However, I do not have administrator privileges and I cannot write to this directory.

I would prefer to have my _gvimrc in a different directory. I do not find a way of ensuring that gvim finds my personal _gvimrc.

I may ask the administrator once to set a PATH, but I cannot expect continuous support for every edit of _gvimrc.

I have seen many related questions, but none is addressing the issue of no-access to the directory vim82.

  • 1
    Welcome to Vi and Vim! Check out the output of the :version command, it's possible that the _gvimrc you're seeing under vim\vim82 is the system gvimrc file and not the user gvimrc file. Note also that for most settings you want them set in the vimrc file and not the gvimrc. Use the gvimrc file mostly for settings related to fonts or mouse, that are only applicable to the GUI version of Vim. The vimrc file is loaded much earlier than the gvimrc file, so there are many settings that will only work in vimrc. – filbranden Mar 2 at 18:16
  • 1
    As @filbranden says, I would assume from :help vimrc that you want MS-Windows $HOME/_vimrc, $HOME/vimfiles/vimrc – D. Ben Knoble Mar 2 at 19:07
  • As a frequent gvim user I can confirm those paths from DBK are what you want. I use c:\Users\{myname}\_vimrc and, only for a few GUI things (e.g. 'guifont' and 'guioptions'), c:\Users\{myname}\_gvimrc. Using _gvimrc allows me to symlink my cygwin .vimrc to _vimrc without having to use things like has("win32") or whatever. – B Layer Mar 2 at 21:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.