VundleVim / Vundle.vim

Vundle, the plug-in manager for Vim
http://github.com/VundleVim/Vundle.Vim
MIT License
23.93k stars 2.58k forks source link

Vundled plugins' ftplugin directories aren't sourced? #114

Closed eater closed 12 years ago

eater commented 12 years ago

I just used Vundle to install https://github.com/xolox/vim-notes which has a file in its ftplugin/ directory that's necessary to the functioning of the plugin. That file is not getting loaded. The plugin works fine with a traditional (non-Vundle) installation. Where does the problem lie?

gmarik commented 12 years ago

Hey! ftplugin/* should be sourced lazily by Vim.

Can you please provide more details how to reproduce the problem?

Ie i just did

  1. :BundleInstall xolox/vim-notes
  2. :Note test

And I got example note with highlights.

Also, the :scriptnames output includes

139: ~/.vim/bundle/vim-notes/plugin/notes.vim
140: ~/.vim/bundle/vim-notes/autoload/xolox/misc/path.vim
141: ~/.vim/bundle/vim-notes/autoload/xolox/misc/os.vim
142: ~/.vim/bundle/vim-notes/autoload/xolox/notes.vim
143: ~/.vim/bundle/vim-notes/autoload/xolox/misc/timer.vim
144: ~/.vim/bundle/vim-notes/autoload/xolox/misc/str.vim
145: ~/.vim/bundle/vim-notes/syntax/notes.vim
146: ~/.vim/bundle/vim-notes/autoload/xolox/misc/escape.vim
147: ~/.vim/bundle/vim-notes/ftplugin/notes.vim

Which means ~/.vim/bundle/vim-notes/ftplugin/notes.vim did get sourced.

Please let me know how can I reproduce the issue. Thank you!

eater commented 12 years ago

To reproduce:

  1. :BundleInstall xolox/vim-notes
  2. :RecentNotes
  3. move cursor to a highlighted note
  4. Hit gf

If the ftplugin file is sourced, gf should take you to the highlighted note file. If it's not (as in my case) it gives an error because it's trying to open the filename under the cursor.

And :scriptnames does not show the ftplugin file.

:set ft shows filetype=notes

:filetype shows filetype detection:ON plugin:ON indent:ON

Manually :source .vim/bundle/vim-notes/ftplugin/notes.vim and gf starts to do what it should.

Annoyingly, this issue is only happening on my Windows 7 machine; the Linux installation is identical, all config dirs synced, but everything happens as expected there.

gmarik commented 12 years ago

Hey what's the state on this?! Still having issues? Unfortunately i'm not a Windows user so I can't really dig into it easily.

eater commented 12 years ago

Yes, this is still happening. I wish I didn't have to use Windows!

ghuntley commented 12 years ago

Having the same issue on OSX using vim-ipython.

Expected behaviour:

Actual behaviour:

Workaround:

Debug

:scriptnames

  1: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/vimrc
  2: ~/.vimrc
  3: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/ftoff.vim
  4: ~/.dotfiles/vim/vim.symlink/bundle/vundle/autoload/vundle.vim
  5: ~/.dotfiles/vim/vim.symlink/bundle/vundle/autoload/vundle/config.vim
  6: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/filetype.vim
  7: ~/.dotfiles/vim/vim.symlink/bundle/vim-git/ftdetect/git.vim
  8: ~/.dotfiles/vim/vim.symlink/bundle/vim-coffee-script/ftdetect/coffee.vim
  9: ~/.dotfiles/vim/vim.symlink/bundle/vim-coffee-script/ftdetect/eco.vim
 10: ~/.dotfiles/vim/vim.symlink/bundle/vim-markdown/ftdetect/markdown.vim
 11: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/menu.vim
 12: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/autoload/paste.vim
 13: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/ftplugin.vim
 14: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/syntax/syntax.vim
 15: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/syntax/synload.vim
 16: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/syntax/syncolor.vim
 17: ~/.dotfiles/vim/vim.symlink/bundle/Railscasts-Theme-GUIand256color/colors/railscasts.vim
 18: ~/.dotfiles/vim/vim.symlink/bundle/vim-fugitive/plugin/fugitive.vim
 19: ~/.dotfiles/vim/vim.symlink/bundle/vim-surround/plugin/surround.vim
 20: ~/.dotfiles/vim/vim.symlink/bundle/supertab/plugin/supertab.vim
 21: ~/.dotfiles/vim/vim.symlink/bundle/pep8/plugin/pep8.vim
 22: ~/.dotfiles/vim/vim.symlink/bundle/snipmate.vim/plugin/snipMate.vim
 23: ~/.dotfiles/vim/vim.symlink/bundle/gist-vim/plugin/gist.vim
 24: ~/.dotfiles/vim/vim.symlink/bundle/minibufexpl.vim/plugin/minibufexpl.vim
 25: ~/.dotfiles/vim/vim.symlink/bundle/Command-T/plugin/command-t.vim
 26: ~/.dotfiles/vim/vim.symlink/bundle/The-NERD-tree/plugin/NERD_tree.vim
 27: ~/.dotfiles/vim/vim.symlink/bundle/gundo.vim/plugin/gundo.vim
 28: ~/.dotfiles/vim/vim.symlink/bundle/vim-makegreen/plugin/makegreen.vim
 29: ~/.dotfiles/vim/vim.symlink/bundle/The-NERD-Commenter/plugin/NERD_commenter.vim
 30: ~/.dotfiles/vim/vim.symlink/bundle/Indent-Guides/plugin/indent_guides.vim
 31: ~/.dotfiles/vim/vim.symlink/bundle/Indent-Guides/autoload/indent_guides.vim
 32: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/getscriptPlugin.vim
 33: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/gzip.vim
 34: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/matchparen.vim
 35: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/netrwPlugin.vim
 36: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/rrhelper.vim
 37: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/spellfile.vim
 38: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/tarPlugin.vim
 39: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/tohtml.vim
 40: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/vimballPlugin.vim
 41: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/plugin/zipPlugin.vim
 42: ~/.dotfiles/vim/vim.symlink/bundle/snipmate.vim/after/plugin/snipMate.vim
 43: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/gvimrc
 44: ~/.gvimrc
 45: /usr/local/Cellar/macvim/7.3-63/MacVim.app/Contents/Resources/vim/runtime/syntax/nosyntax.vim
 46: ~/.dotfiles/vim/vim.symlink/bundle/The-NERD-tree/nerdtree_plugin/exec_menuitem.vim
 47: ~/.dotfiles/vim/vim.symlink/bundle/The-NERD-tree/nerdtree_plugin/fs_menu.vim

mvim --version

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Dec 28 2011 12:35:05)
MacOS X (unix) version
Included patches: 1-353
Compiled by ghuntley@Geoffreys-MacBook-Air.local
Huge version with MacVim GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +fork() +fullscreen 
-gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap 
+libcall +linebreak +lispindent +listcmds +localmap -lua +menu +mksession 
+modify_fname +mouse +mouseshape +mouse_dec -mouse_gpm -mouse_jsbterm 
+mouse_netterm -mouse_sysmouse +mouse_xterm +mouse_urxvt +multi_byte 
+multi_lang -mzscheme +netbeans_intg +odbeditor +path_extra +perl 
+persistent_undo +postscript +printer +profile +python -python3 +quickfix 
+reltime +rightleft +ruby +scrollbind +signs +smartindent -sniff +startuptime 
+statusline -sun_workshop +syntax +tag_binary +tag_old_static -tag_any_white 
+tcl +terminfo +termresponse +textobjects +title +toolbar +transparency 
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace 
+wildignore +wildmenu +windows +writebackup -X11 -xfontset +xim -xsmp 
-xterm_clipboard -xterm_save 
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/Applications/MacVim.app/Contents/Resources/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe  -DMACOS_X_UNIX -no-cpp-precomp  -g -O2 -arch x86_64 -D_FORTIFY_SOURCE=1     -I/System/Library/Frameworks/Tcl.framework/Headers  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_DARWIN_C_SOURCE=1  
Linking: gcc   -L.  -L.       -arch x86_64 -L/usr/local/lib -o Vim -framework Cocoa -framework Carbon      -lncurses -liconv -framework Cocoa    -fstack-protector -L/usr/local/lib  -L/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE -lperl -lm -lutil -lc -framework Python  -F/System/Library/Frameworks -framework Tcl -framework CoreFoundation -lruby.1.9.1 -lobjc -L/Users/ghuntley/.rvm/rubies/ruby-1.9.2-p290/lib   

.dotfiles:

https://github.com/ghuntley/dotfiles/tree/master/vim
randymorris commented 12 years ago

@ghuntley I just did the following:

  1. Added Bundle "vim-ipython" to my config
  2. EDIT Ran source % to reload my config so vundle picked up the new Bundle line
  3. Ran BundleInstall
  4. :e foo.py
  5. :I<tab> produces :IPython

Are you testing with a python buffer loaded? Files in ftplugin are not sourced until a file of that type is loaded. I also notice that in your .vimrc you have filetype plugin on before a couple of the Bundle commands. I'm not sure if that could interfere with anything but that's not how the example config is set up in the README.

I'm using the latest git snapshot of vundle on linux.

EDIT: Added an additional step that I forgot to add before.

gmarik commented 12 years ago

did quick test and cannot reproduce the issue.

Since it's an ftplugin it's available only when editing a *.py file. @ghuntley, make sure you go through 4. item on @rson's list

Let me know how that works for you! thanks!

gmarik commented 12 years ago

Hey @ghuntley haven'y heard from you. So closing. Feel free to reopen if you keep having issues