Make VimwikiGetKnownExtensions into script-local function s:vimwiki_get_known_extensions
This commit is contained in:
parent
f5e1cbe721
commit
556f686431
@ -357,7 +357,7 @@ function! VimwikiClear(option, ...) "{{{
|
|||||||
endfunction "}}}
|
endfunction "}}}
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
function! VimwikiGetKnownExtensions() " {{{
|
function! s:vimwiki_get_known_extensions() " {{{
|
||||||
" Getting all extensions that different wikis could have
|
" Getting all extensions that different wikis could have
|
||||||
let extensions = {}
|
let extensions = {}
|
||||||
for wiki in g:vimwiki_list
|
for wiki in g:vimwiki_list
|
||||||
@ -503,7 +503,7 @@ augroup end
|
|||||||
|
|
||||||
augroup vimwiki
|
augroup vimwiki
|
||||||
autocmd!
|
autocmd!
|
||||||
for s:ext in VimwikiGetKnownExtensions()
|
for s:ext in s:vimwiki_get_known_extensions()
|
||||||
exe 'autocmd BufEnter *'.s:ext.' call s:setup_buffer_reenter()'
|
exe 'autocmd BufEnter *'.s:ext.' call s:setup_buffer_reenter()'
|
||||||
exe 'autocmd BufWinEnter *'.s:ext.' call s:setup_buffer_enter()'
|
exe 'autocmd BufWinEnter *'.s:ext.' call s:setup_buffer_enter()'
|
||||||
exe 'autocmd BufLeave,BufHidden *'.s:ext.' call s:setup_buffer_leave()'
|
exe 'autocmd BufLeave,BufHidden *'.s:ext.' call s:setup_buffer_leave()'
|
||||||
|
Loading…
Reference in New Issue
Block a user