Add FileType for load autocmd FileType settings.#7
Add FileType for load autocmd FileType settings.#7heavenshell wants to merge 2 commits intosunaku:masterfrom
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'
endfunctionThis 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 onWould 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 onDoes 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.vimto~/.vim/ftbundle/python/and then open python file.But
jedi.vimdid not work at GUI MacVim.app.(CUI MacVim works well)
unbundle.vim did not load
autocmd FileTypewhen ftbundle plugin loaded.jedi.vimdefinedautocmd FileType pythonat 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
FileTypetodoautoall.Please check and include.
Regards,