While I have been using nvim (on Linux) for some time, I have only recently started using gvim (on Linux and Windows).

I have noticed that on the Windows version of gvim there are directories amongst the program configuration files called indent and ftplugin. I have read about what these do, but I would like to know if I have already had these being used when I am using nvim on Linux or if this is just something that had been added to my gvim on Windows installation because of the installation options I checked.

I've added these directories to my nvim configuration but I have not noticed anything different so far. I use .yaml files a lot and nvim seems to still mess them up when I select everything and press =. I also use .sh and .py files a lot but nothing has changed as far as I am aware.

To clarify, the files that I have copied to my configuration (for Linux and Windows) come from C:\Program Files (x86)\Vim\vim82\indent and C:\Program Files (x86)\Vim\vim82\ftplugin.

Bearing in mind that I often use the appimage version of nvim, but also the Debian/Ubuntu packaged version, is there any benefit of having these files in the indent and ftplugin directories in my configuration?

  • Can you edit to clarify the question: Are the indent and ftplugin directories from your original in the user configuration directory (~/.vim on *nix, ~/vimfiles on Windows) or in the system configuration directory or the vimruntime (see :help runtimepath)? It's also possible you have some files that you copied out of a distribution or plugin, so you could check them against other files in your runtimepath and see if they are (near) duplicates. In general, files there are loaded with :filetype plugin indent on.
    – D. Ben Knoble
    Jul 23 at 19:30
  • @D.BenKnoble I have added where they come from. What I am asking is if these files are already included in an installation of vim or gvim on Linux or on an installation of nvim on Linux, or is there is no point in including these files in my configuration.
    – paradroid
    Jul 25 at 16:40


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.