GVim plugins do not work

I need help installing some popular plugins in Vim. I just started to learn this editor and am very happy to use popular plugins. I use gVim on Windows XP and extracted the .vim files and copied them to the Program Files Vim folder.

In my folder "F: \ Program Files \ Vim" there are exactly two folders: " vim73 " and the vimfiles folder. I put the .vim files (EasyMotion.vim) in the plugin folder inside the vimfiles folder.

When I start gVim, the plugins do not work, and in my case the EasyMotion plugin does not work. I typed "/ w" to make EasyMotion plugin (as indicated in its use on its github account) and nothing works.

Am I missing something? Are there any additional commands to insert a vimrc file to recognize these plugins?

Hurrah!

+6
source share
2 answers

Do not touch the program files. There is a vim installation called 'runtimepath' (see :help 'rtp' ), which says that Vim is going to find plugins. For each directory in the execution path, Vim will download each .vim file located in the plugin subfolder and look for functions that contain # in their names in the .vim files in the autoload folder. It will also look for filetype plugins in the ftplugin folder if 'ft' .

Usually you should have %HOMEPATH%\Vim\vimfiles in your execution path ( :echo &rtp to know). Unzip Easymotion there, NOT in Program Files.

Thanks to this structure, vim plugins are mixed in the same 2-3 folders. However, you can install each plugin in its own subfolder if you play with runtimepath. The pathogen plugin is dedicated to this. This allows you to have each plugin in its own subfolder and adds each root folder of the plugin to the execution path. Readme is self-explanatory.

+8
source

As @benoit said, you should never paste files into the vim73 folder (noticeable exceptions exist, but you'll know when you meet them).

On Windows, Vim looks for configuration files (including _vimrc and your plugins) in several directories in a specific order. At first he will look in

  • $HOME ... which is your c:\documents and settings\username\ folder
  • $VIM Vim ... which is the folder in which you installed or uninstalled Vim
  • $VIMRUNTIME ... which is your folder \vim73 ...

etc.

What does it mean? This means that he will first look into $HOME before looking at let's say the Vim installation folder. So this is a great way to separate plugins that you just want to test before you are sure that you are going to keep them.

For example, you can organize files related to Vim in this way:
- install vim to c:\vim or c:\program files\vim\
(vim program files will go into \...\vim\vim73\ )
- put _vimrc in \vim\
- put your vimfiles in \vim\vimfiles\
- and put your temporary vimfiles in c:\documents and settings\username\vimfiles\

That way, when you are done with them, you can simply delete the last \username\vimfiles\ .

+6
source

Source: https://habr.com/ru/post/904965/


All Articles