vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit f5e1cbe72134bba611dc7ba8b71d03d0025d5d0b
parent 66626ad415f4423c9d1e6bc57ae485a5685cf849
Author: Ivan Tishchenko <ivan.tishchenko@dsr-company.con>
Date:   Fri, 23 Jan 2015 22:41:36 +0300

Move get-known-sytaxes back into base.vim

Diffstat:
Mautoload/vimwiki/base.vim | 19++++++++++++++++++-
Mplugin/vimwiki.vim | 16----------------
2 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim @@ -8,6 +8,23 @@ if exists("g:loaded_vimwiki_auto") || &cp endif let g:loaded_vimwiki_auto = 1 +" s:vimwiki_get_known_syntaxes +function! s:vimwiki_get_known_syntaxes() " {{{ + " Getting all syntaxes that different wikis could have + let syntaxes = {} + let syntaxes['default'] = 1 + for wiki in g:vimwiki_list + if has_key(wiki, 'syntax') + let syntaxes[wiki.syntax] = 1 + endif + endfor + " append map g:vimwiki_ext2syntax + for syn in values(g:vimwiki_ext2syntax) + let syntaxes[syn] = 1 + endfor + return keys(syntaxes) +endfunction " }}} + " vimwiki#base#apply_wiki_options function! vimwiki#base#apply_wiki_options(options) " {{{ Update the current " wiki using the options dictionary @@ -1905,7 +1922,7 @@ endfunction " }}} " ------------------------------------------------------------------------- " Load syntax-specific Wiki functionality -for s:syn in VimwikiGetKnownSyntaxes() +for s:syn in s:vimwiki_get_known_syntaxes() execute 'runtime! autoload/vimwiki/'.s:syn.'_base.vim' endfor " ------------------------------------------------------------------------- diff --git a/plugin/vimwiki.vim b/plugin/vimwiki.vim @@ -374,22 +374,6 @@ function! VimwikiGetKnownExtensions() " {{{ return keys(extensions) endfunction " }}} -function! VimwikiGetKnownSyntaxes() " {{{ - " Getting all syntaxes that different wikis could have - let syntaxes = {} - let syntaxes['default'] = 1 - for wiki in g:vimwiki_list - if has_key(wiki, 'syntax') - let syntaxes[wiki.syntax] = 1 - endif - endfor - " append map g:vimwiki_ext2syntax - for syn in values(g:vimwiki_ext2syntax) - let syntaxes[syn] = 1 - endfor - return keys(syntaxes) -endfunction " }}} - " }}} " CALLBACK functions "{{{