From 5419fad3f75f57c47a34671b0f1f03db8d79de03 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Thu, 15 Feb 2018 18:38:39 +0100 Subject: [PATCH] Formatting and small refactorings --- autoload/vimwiki/vars.vim | 214 +++++++++++++++++++++++++------------- doc/vimwiki.txt | 12 +-- ftplugin/vimwiki.vim | 15 ++- plugin/vimwiki.vim | 97 +++++++++-------- 4 files changed, 208 insertions(+), 130 deletions(-) diff --git a/autoload/vimwiki/vars.vim b/autoload/vimwiki/vars.vim index ca45020..36fb9f5 100644 --- a/autoload/vimwiki/vars.vim +++ b/autoload/vimwiki/vars.vim @@ -1,12 +1,31 @@ " vim:tabstop=2:shiftwidth=2:expandtab:textwidth=99 " Vimwiki autoload plugin file -" Desc: stuff concerning Vimwiki's state " Home: https://github.com/vimwiki/vimwiki/ +" ------------------------------------------------------------------------------------------------ +" This file provides functions to manage the various state variables which are needed during a +" Vimwiki session. +" They consist of: +" +" - global variables. These are stored in the dict g:vimwiki_global_vars. They consist mainly of +" global user variables and syntax stuff which is the same for every syntax. +" +" - wiki-local variables. They are stored in g:vimwiki_wikilocal_vars which is a list of +" dictionaries. One dict for every registered wiki. The last dictionary contains default values +" (used for temporary wikis). +" +" - syntax variables. Stored in the dict g:vimwiki_syntax_variables which holds all the regexes and +" other stuff which is needed for highlighting. +" +" - buffer-local variables. They are stored as buffer variables directly (b:foo) + +" As a developer, you should, if possible, only use the get_ and set_ functions for these types of +" variables, not the underlying dicts! +" ------------------------------------------------------------------------------------------------ + -" copy the user's settings from variables of the form g:vimwiki_