0

My home is H:/.

The output of :set rtp? gives

runtimepath=H:\vimfiles,H:\.vim\bundle\Vundle.vim,H:\.vim\bundle\ale,H:\.vim\bundle\SimpylFold,H:\.vim\bundle\ctrlp,C:\Program Files (x86)\Vim/vimfiles,C:\Program Files (x86)\Vim\vim82,C:\Program Files (x86)\Vim/vimfiles/after,H:\vimfiles/after,H:\vimfiles/bundle/Vundle.vim,H:\.vim\bundle\Vundle.vim/after,H:\.vim\bundle\ale/after,H:\.vim\bundle\SimpylFold/after,H:\.vim\bundle\ctrlp/after 

This suggests that Vundle is searching for plugins in the ~/.vim folder whereas I want it to search in ~/vimfiles folder. I have cloned all my plugins into ~/vimfiles/plugin because I discovered that plugin is a directory that will be searched for runtime files (from :help runtimepath).

If I leave my plugins into ~/vimfiles/plugin generate the error of the form

E121: Undefined variable: g:ctrlp_ext_vars
E116: Invalid arguments for function add

Here is an excerpt of my _vimrc

" --- VUNDLE PLUGIN STUFF BEGIN --------
filetype off                  " required
" Vundle plugin manager
"set the runtime path to include Vundle and initialize
set rtp+=~/vimfiles/bundle/Vundle.vim
 call vundle#begin()
" let Vundle manage Vundle, required
" add all your plugins here (note older versions of Vundle
" used Bundle instead of Plugin)
Plugin 'gmarik/Vundle.vim'
Plugin 'dense-analysis/ale'
Plugin 'tmhedberg/SimpylFold'
Plugin 'ctrlpvim/ctrlp'
call vundle#end()            " required
filetype plugin indent on    " required for Vundle
" ---- VUNDLE PLUGIN STUFF END ----------
"

Vim version

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Sep 21 2021 22:13:38)
MS-Windows 32-bit console version
Included patches: 1-3452
Compiled by appveyor@APPVYR-WIN
Huge version without GUI.  Features included (+) or not (-):
+acl                +cscope             +iconv/dyn          +multi_lang         +smartindent        -toolbar
+arabic             +cursorbind         +insert_expand      +mzscheme/dyn       -sodium             +user_commands
+autocmd            +cursorshape        +ipv6               -netbeans_intg      +sound              +vartabs
+autochdir          +dialog_con         +job                +num64              +spell              +vertsplit
+autoservername     +diff               +jumplist           +packages           +startuptime        +virtualedit
-balloon_eval       +digraphs           +keymap             +path_extra         +statusline         +visual
+balloon_eval_term  -dnd                +lambda             +perl/dyn           -sun_workshop       +visualextra
-browse             -ebcdic             +langmap            +persistent_undo    +syntax             +viminfo
++builtin_terms     +emacs_tags         +libcall            +popupwin           +tag_binary         +vreplace
+byte_offset        +eval               +linebreak          -postscript         -tag_old_static     +vtp
+channel            +ex_extra           +lispindent         +printer            -tag_any_white      +wildignore
+cindent            +extra_search       +listcmds           +profile            +tcl/dyn            +wildmenu
+clientserver       -farsi              +localmap           +python/dyn         +termguicolors      +windows
+clipboard          +file_in_path       +lua/dyn            +python3/dyn        +terminal           +writebackup
+cmdline_compl      +find_in_path       +menu               +quickfix           -termresponse       -xfontset
+cmdline_hist       +float              +mksession          +reltime            +textobjects        -xim
+cmdline_info       +folding            +modify_fname       +rightleft          +textprop           -xpm_w32
+comments           -footer             +mouse              +ruby/dyn           -tgetent            -xterm_save
+conceal            +gettext/dyn        -mouseshape         +scrollbind         +timers
+cryptv             -hangul_input       +multi_byte_ime/dyn +signs              +title
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$HOME\vimfiles\vimrc"
 3rd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
       defaults file: "$VIMRUNTIME\defaults.vim"
3
  • 1
    Don’t clone plugins from GitHub into the plugin directory. They are not the same use of the word plugin. Every file in the plugin directory on the runtimepath will be executed at vim startup. Most online plugins are structured as mini runtimepath s (e.g. you don’t want to execute all compiler or colorscheme scripts at startup). So you want to let Vundle manage that for you, or use something more like packages.
    – D. Ben Knoble
    Sep 24 '21 at 11:43
  • Thanks for the tip. I changed the destination folder to H:\vimfiles\bundle but when I run :PluginInstall nothing happens in-spite Vundle claims Done! Sep 24 '21 at 13:21
  • I solved it by manually cloning the plugins git clone https://github.com/tmhedberg/SimpylFold.git H:/vimfiles/bundle/SimpylFold but I am not sure this is the right way of doing it. Sep 24 '21 at 13:30
1

If you open vundle readme, the example configuration has that info:

set nocompatible              " be iMproved, required
filetype off                  " required

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')

So I would try call vundle#begin(':H/vimfiles/bundle')

2
  • Tried. When I run :PluginInstall it goes through and it output the write "Installing plugins to H:\vimfiles\bundle" (that is the place where I want my plugins to be installed, I changed the destination folder due to the comment above), but nothing is cloned into H:\vimfiles\bundle. Sep 24 '21 at 13:17
  • I solved it by manually cloning the plugins git clone https://github.com/tmhedberg/SimpylFold.git H:/vimfiles/bundle/SimpylFold but I am not sure this is the right way of doing it. Sep 24 '21 at 13:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.