Преглед изворни кода

Ensure ftplugin files are loaded (#24)

If `filetype plugin on` is called before `plug#end()`, filetype
plugin handler is invoked before ODL autocmd from vim-plug which
updates runtimepath and ftplugin files are not loaded.
Junegunn Choi пре 11 година
родитељ
комит
a026eb39c4
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      plug.vim

+ 1 - 0
plug.vim

@@ -201,6 +201,7 @@ endfunction
 function! s:lod_ft(pat, name, plug)
   call s:lod(a:plug, ['plugin', 'after'])
   execute 'autocmd! PlugLOD FileType ' . a:pat
+  let &l:filetype = &l:filetype
 endfunction
 
 function! s:lod_cmd(cmd, bang, l1, l2, args, plug)