Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run ftdetect in Vundle #976

Open
MisterSnrub opened this issue Aug 14, 2024 · 1 comment
Open

Cannot run ftdetect in Vundle #976

MisterSnrub opened this issue Aug 14, 2024 · 1 comment

Comments

@MisterSnrub
Copy link

I am using Vim 7.4 on Linux with Vundle and Git. I am writing my own plugin called potion (following an example in the book LEARN VIMSCRIPT THE HARD WAY by Steve Losh) that is stored in my GitHub repository.

The potion folder structure looks like the following:

potion
+ README
+ LICENSE
- colors/
   + potion.vim
- doc/
   + potion.txt
- ftdetect/
   + potion.vim

Using a brand new environment, I copy the Vundle repo:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim

I have the following as my minimalist .vimrc file:

set nocompatible

filetype off                   " required
filetype plugin on

set rtp+=~/.vim/bundle/Vundle.vim/

call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'

" Load my plugin.
Plugin 'MisterSnrub/potion'

call vundle#end() " required!

filetype plugin indent on     " required

After loading my potion plugin, I create a new file ~/factorial.vim. The ftdetect/potion.vim file should be run and a "Hello world" message should be output. And if we type "set ft?" in factorial.pn, it still does not recognize the potion filetype.

However, if I copy-and-paste the file ~/.vim/bundle/potion/ftdetect/potion.vim file to ~/.vim/ftdetect/potion.vim (so that it is run outside of the Vundle process), I do get the "Hello world" output, and "set ft?" returns "filetype=potion", as expected.

Tested in Vim 7.4

@MisterSnrub
Copy link
Author

Also tested in gVim version 9.1 using "~/vimfiles/bundle" as my Vundle folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant