1. ZyX_I
  2. frawor

Commits

ZyX_I  committed fb31402

Done some reformatting

  • Participants
  • Parent commits a7a939f
  • Branches default

Comments (0)

Files changed (1)

File doc/frawor.txt

View file
  • Ignore whitespace
         Registers plugin sourced from {file} that has given {version} (see 
         |frawor-t-version|; {version} must have at least two components). If 
         {oneload} is true, then plugin is considered loaded when it is 
-        registered. {dependencies} argument is a dictionary that contains pairs 
-        {depplid} - {depversion} where each {depversion} must have at least one 
-        component. Arguments {g} and {F} must contain dictionaries with global 
-        and function variables.
+        registered. {dependencies} argument is a dictionary that contains 
+        pairs {depplid} - {depversion} where each {depversion} must have at 
+        least one component. Arguments {g} and {F} must contain dictionaries 
+        with global and function variables.
         This function returns dictionary with the following keys:
         Key          Description ~
         id           Plugin identifier string. Normally it contains a list of 
         runtimepath  Runtimepath of your plugin (empty if frawor failed to 
                      detect it).
         type         First component of plugin file path that is not part of 
-                     runtimepath (or `/unknown' if frawor failed to detect it).
+                     runtimepath (or `/unknown' if frawor failed to detect 
+                     it).
                                                      *frawor-anonymous-plugin*
-        You may specify 0 instead of {version}. In this case plugin type will be 
-        `/anonymous', plugin id will be equal to `file' argument (possibly with 
-        some trailing `/' added), runtimepath will be empty.
+        You may specify 0 instead of {version}. In this case plugin type will 
+        be `/anonymous', plugin id will be equal to `file' argument (possibly 
+        with some trailing `/' added), runtimepath will be empty.
 
 frawor#Setup(version, dependencies, oneload)                  *frawor#Setup()*
         Creates s:F, s:g global variables, s:Eval function, creates 
 
 warn : function ({msgid}, ...) + s:g._messages → {message}     *frawor-f-warn*
         Echoes message `Frawor:{plid}:{msgid}:{message}' where {message} is 
-        obtained by getting {msgid} out of `s:g._messages' (s:g is a dictionary 
-        that is passed as last but one argument to FraworRegister). If more then 
-        one argument is present, then {message} and that arguments will be 
-        passed to |printf()|. Warn function returns the whole message echoed. 
-        {plid} is an id of a plugin that uses this function. Semicolon and 
-        backslash in {plid} and {msgid} will be escaped.
+        obtained by getting {msgid} out of `s:g._messages' (s:g is 
+        a dictionary that is passed as last but one argument to 
+        FraworRegister). If more then one argument is present, then {message} 
+        and that arguments will be passed to |printf()|. Warn function returns 
+        the whole message echoed. {plid} is an id of a plugin that uses this 
+        function. Semicolon and backslash in {plid} and {msgid} will be 
+        escaped.
 throw : function ({msgid}, ...) → exception                   *frawor-f-throw*
         Calls |frawor-f-warn| and throws an exception with text 
         `Frawor:{plid}:{msgid}:{message}' where {message} is a value returned by 
         escaped.
 newfeature : function ({fid}, {fopts})                   *frawor-f-newfeature*
            + unload
-        Registers plugin feature with id {fid} ({fid} must contain only digits, 
-        latin letters and underscores). {fopts} is a dictionary with the 
-        following keys (all are optional, but feature without any keys is 
+        Registers plugin feature with id {fid} ({fid} must contain only 
+        digits, latin letters and underscores). {fopts} is a dictionary with 
+        the following keys (all are optional, but feature without any keys is 
         useless):
         Key        Description ~
-        cons       Reference to a function that will take |frawor-t-plugdict| as 
-                   its first argument and, possibly, some additional arguments. 
-                   It is just a normal function that can do anything related to 
-                   the plugin that uses frawor. Function that is a wrapper to 
-                   this function will be added to s:F._frawor dictionary under 
-                   the same conditions for which `load' function is called 
-                   (except that `ignoredeps' option has no effect).
-        register   Reference to a function that will take |frawor-t-plugdict| as 
-                   its first argument. This function will be called once after 
-                   plugin is registered for each plugin that depends on the 
-                   feature definer.
-        load       Reference to a function that will take |frawor-t-plugdict| as 
-                   its first argument. This function will be called only once 
-                   for each plugin that depends on the feature definer. If value 
-                   returned by this function is not 0, then it will be assigned 
-                   to plugdict.features[{fid}].
+        cons       Reference to a function that will take |frawor-t-plugdict| 
+                   as its first argument and, possibly, some additional 
+                   arguments. It is just a normal function that can do 
+                   anything related to the plugin that uses frawor. Function 
+                   that is a wrapper to this function will be added to 
+                   s:F._frawor dictionary under the same conditions for which 
+                   `load' function is called (except that `ignoredeps' option 
+                   has no effect).
+        register   Reference to a function that will take |frawor-t-plugdict| 
+                   as its first argument. This function will be called once 
+                   after plugin is registered for each plugin that depends on 
+                   the feature definer.
+        load       Reference to a function that will take |frawor-t-plugdict| 
+                   as its first argument. This function will be called only 
+                   once for each plugin that depends on the feature definer. 
+                   If value returned by this function is not 0, then it will 
+                   be assigned to plugdict.features[{fid}].
                    Function will be called under following circumstances:
                    1. If feature definer (plugin that registered feature) was 
                       loaded before plugin that requires it, then it will be 
                    |Dictionary| that is a value of `init' key somewhere, 
                    modifications done to these structures will take effect on 
                    init value recorded in the next plugin.
-        unload     Reference to a function that will take |frawor-t-plugdict| as
-                   its first argument. This function will be called only once 
-                   for each plugin that depends on the plugin that registers 
-                   this feature. Function will be called when dependent plugin 
-                   is unloaded.
-        unloadpre  Just like unload, but function will be called when plugin is 
-                   queued for unloading, but nothing was yet unloaded.
-        ignoredeps If this key is present, then load, unload and unloadpre keys 
-                   will be called for all plugins even if they do not specify 
-                   plugin which defined this feature in dependencies (feature 
-                   definer). Key `cons' will be ignored for plugins that do not 
-                   specify feature definer in dependencies.
+        unload     Reference to a function that will take |frawor-t-plugdict| 
+                   as its first argument. This function will be called only 
+                   once for each plugin that depends on the plugin that 
+                   registers this feature. Function will be called when 
+                   dependent plugin is unloaded.
+        unloadpre  Just like unload, but function will be called when plugin 
+                   is queued for unloading, but nothing was yet unloaded.
+        ignoredeps If this key is present, then load, unload and unloadpre 
+                   keys will be called for all plugins even if they do not 
+                   specify plugin which defined this feature in dependencies 
+                   (feature definer). Key `cons' will be ignored for plugins 
+                   that do not specify feature definer in dependencies.
 delfunctions : unloadpre + s:F._functions              *frawor-f-delfunctions*
         Defined in plugin/frawor/functions plugin. Deletes all non-anonymous 
-        functions in s:F._functions dictionary before plugin is unloaded. Note 
-        that you should not unload plugin/frawor/functions because it is 
+        functions in s:F._functions dictionary before plugin is unloaded.
+        Note that you should not unload plugin/frawor/functions because it is 
         required for other plugins to be unloaded correctly.
                                                     *frawor-f-addextfunctions*
 addextfunctions : function ({ {funcname}: {funcdescr} }) + s:F._functions
         Defined in plugin/frawor/functions plugin. Adds external functions and 
-        puts them into s:F._functions. If plugin that calls this feature is not 
-        yet loaded, |FuncUndefined| events will be created instead of functions. 
-        {funcname} must be a valid function name (names that start with s: are 
-        also supported, though it is probably better to just use `let 
-        s:F._functions['s:Func']=function('s:Func')' after each plugin-local 
-        function definition). This feature will throw an error if function is 
-        already defined and there is no way to avoid that, so do not create 
-        functions that can unload your plugin with this feature. Each 
-        {funcdescr} must be a dictionary with the following keys:
+        puts them into s:F._functions. If plugin that calls this feature is 
+        not yet loaded, |FuncUndefined| events will be created instead of 
+        functions. {funcname} must be a valid function name (names that start 
+        with s: are also supported, though it is probably better to just use 
+        `let s:F._functions['s:Func']=function('s:Func')' after each 
+        plugin-local function definition). This feature will throw an error if 
+        function is already defined and there is no way to avoid that, so do 
+        not create functions that can unload your plugin with this feature. 
+        Each {funcdescr} must be a dictionary with the following keys:
         Key        Description ~
         function   Function reference. Determines function that will be called.
         checker    See |frawor-t-checker|. Throws `checkfailed' exception if 
                    check fails.
         filter     See |frawor-t-filter|. Throws `filterfailed' exception if 
                    filtering fails.
-                   If both `checker' and `filter' are present, then `checker' is 
-                   used first.
-        altervars  List of lists [({varname}, {value})]. If this key is present 
-                   before `function' is called all variables with given names 
-                   will be assigned corresponding {value}s and their values will 
-                   be restored after function returns (see |:finally|). 
-                   {varname} may be the following: `g:{gvarname}' for global 
-                   variables, buffer-local `b:{bvarname}', tabpage-local 
-                   `t:{tvarname}' and window-local `w:{wvarname}' variables as 
-                   well as `&g:{optname}' and `&l:{optname}' options will be 
-                   restored for buffer, tab or window that will be active after 
-                   function returns (regardless whether they were changed). 
-                   |v:count| and |v:register| are also accepted, they are 
-                   restored by prepending count or register to a command that 
-                   does nothing. `&{optname}' options are forbidden, use `&g:' 
-                   or `&l:' instead. In addition to options and variables you 
-                   can use `+{intname}', see |frawor-f-addalt|. Variables are 
+                   If both `checker' and `filter' are present, then `checker' 
+                   is used first.
+        altervars  List of lists [({varname}, {value})]. If this key is 
+                   present before `function' is called all variables with 
+                   given names will be assigned corresponding {value}s and 
+                   their values will be restored after function returns (see 
+                   |:finally|). {varname} may be the following: `g:{gvarname}' 
+                   for global variables, buffer-local `b:{bvarname}', 
+                   tabpage-local `t:{tvarname}' and window-local 
+                   `w:{wvarname}' variables as well as `&g:{optname}' and 
+                   `&l:{optname}' options will be restored for buffer, tab or 
+                   window that will be active after function returns 
+                   (regardless whether they were changed). |v:count| and 
+                   |v:register| are also accepted, they are restored by 
+                   prepending count or register to a command that does 
+                   nothing. `&{optname}' options are forbidden, use `&g:' or 
+                   `&l:' instead. In addition to options and variables you can 
+                   use `+{intname}', see |frawor-f-addalt|. Variables are 
                    altered before `checker' or `filter' are called. Note: you 
                    may omit {value} item. In this case variable is saved and 
                    restored but not altered.
         Key           Description ~
         type          Plugin type (first path component after runtimepath, 
                       string "/unknown" if detection of runtimepath failed and 
-                      string "/anonymous" if |FraworRegister()| got zero instead 
-                      of version).
+                      string "/anonymous" if |FraworRegister()| got zero 
+                      instead of version).
         id            Plugin id.
         runtimepath   Plugin runtimepath, empty if detection of rtp failed or 
                       |FraworRegister()| got zero instead of version.
                       0 - plugin is not loaded
                       1 - plugin is registered, but not loaded
                       2 - plugin is loaded
-        features      Dictionary which is populated by registered features, see 
-                      |frawor-f-newfeature|.
+        features      Dictionary which is populated by registered features, 
+                      see |frawor-f-newfeature|.
         F             Dictionary with functions (last argument to 
                       |FraworRegister()|).
-        g             Dictionary with global variables (last but one argument to 
-                      |FraworRegister()|).
-checker :: Function                                           *frawor-t-checker*
+        g             Dictionary with global variables (last but one argument 
+                      to |FraworRegister()|).
+checker :: Function                                         *frawor-t-checker*
         If checker is a function reference, then in order to check arguments 
         this function will be called with an argument list as an only 
         argument. Check is considered passed when this function returns 1 and 
         failed when this function returns 0.
-filter :: Function                                             *frawor-t-filter*
+filter :: Function                                           *frawor-t-filter*
         If filter is a function reference, then in order to filter arguments 
         this function will be called with an argument list as an only argument. 
         If function returns a |List|, then it will be used as a new argument