-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add FileType for load autocmd FileType settings. #7
Conversation
Thanks for the patch. But I have one concern: Unftbundle() ends up calling itself because the Also, the |
Hi, thanks for quick reply.
I reproduced in Windows GUI/CUI Vim following steps(I use old Windows XP).
Sorry, I hava no idea why CUI MacVim works ok :-( Regards, |
Hi, I continute to look into this problem. I think another plugin conflict to jedi.vim. I applicate your kindness. Regards, |
Sure, I will wait. There's no hurry. 😇 |
HI, The reason why this problem occured by If Following code is a sample to check autocmd behavior. autocmd!
set nocompatible
filetype indent plugin on
filetype off
filetype indent plugin on
autocmd FileType vim call s:Sample()
function! s:Sample()
echomsg 'sample'
endfunction This script echo A lot of Japanese Vim user favor to use Vim-Kaoriya package which are included Original Vim binary + additional plugins + some patches. FYI Vim detect So Followings are use-cases of filetype state when unbundle.vim loaded.
I update my patch. BTW I reported MacVim CUI works ok before, sorry that was my probrem. Please check. Regards, |
Thanks for the explanation and updated patch! ✨ What if we turn off filetype detection before turning it on? diff --git a/unbundle.vim b/unbundle.vim
index 09b47bd..b25b91f 100644
--- a/unbundle.vim
+++ b/unbundle.vim
@@ -49,5 +49,6 @@ augroup Unftbundle
autocmd!
autocmd FileType * call Unftbundle(expand('<amatch>'))
augroup END
runtime! ftbundle/*/*/ftdetect/*.vim
+filetype off
filetype plugin indent on Would that solve the problem? |
Hi, thank you for comment.
No. You can see filetype info to type
Regards, |
Thanks for the detailed analysis! 👍 Since Vim is caching the diff --git a/unbundle.vim b/unbundle.vim
index 09b47bd..b25b91f 100644
--- a/unbundle.vim
+++ b/unbundle.vim
@@ -49,5 +49,6 @@ augroup Unftbundle
autocmd!
autocmd FileType * call Unftbundle(expand('<amatch>'))
augroup END
runtime! ftbundle/*/*/ftdetect/*.vim
+filetype plugin indent off
filetype plugin indent on Does that solve it? By the way, I am asking you these additional questions because I think the solution can be made shorter (less lines of code). Thanks for your patience. |
Hi, Great, it's works!
Totally agree with you. Thank you for solving problem. |
Merged as c854f6a. Thanks for your contribution! 😺 |
Hi, nice plugin I like it. But I've got a problem.
I use jedi.vim which is auto complete for Python.
I've Downloaded
jedi.vim
to~/.vim/ftbundle/python/
and then open python file.But
jedi.vim
did not work at GUI MacVim.app.(CUI MacVim works well)
unbundle.vim did not load
autocmd FileType
when ftbundle plugin loaded.jedi.vim
definedautocmd FileType python
at https://github.com/davidhalter/jedi-vim/blob/master/plugin/jedi.vim#L49(One of the example using
autocmd FileType
)IMHO unbundle.vim is heavily related with filetype. A lot of FileType plugin defined
autocmd FileType
.So, I add
FileType
todoautoall
.Please check and include.
Regards,