Vim documentation: vital/Mapping

main help file
vital/Mapping.txt             Utilities for mapping / abbreviation.

Maintainer: tyru    <tyru.exe@gmail.com>

==============================================================================
CONTENTS                                Vital.Mapping-contents

INTRODUCTION                    Vital.Mapping-introduction
INTERFACE                       Vital.Mapping-interface
  Functions                       Vital.Mapping-functions

==============================================================================
INTRODUCTION                            Vital.Mapping-introduction

Vital.Mapping is a utility functions related to :map, :unmap,
:abbreviate, :unabbreviate commands.

==============================================================================
INTERFACE                               Vital.Mapping-interface
------------------------------------------------------------------------------
FUNCTIONS                               Vital.Mapping-functions

                                Vital.Mapping.execute_abbr_command()
execute_abbr_command({mode}, {dict}, {lhs}, {rhs})
        Execute get_abbr_command(mode, dict, lhs, rhs) result.
        See Mapping.get_abbr_command().

                                Vital.Mapping.execute_map_command()
execute_map_command({mode}, {dict}, {lhs}, {rhs})
        Execute get_map_command(mode, dict, lhs, rhs) result.
        See Mapping.get_map_command().

                                Vital.Mapping.execute_unmap_command()
execute_unmap_command({mode}, {dict}, {lhs})
        Execute get_unmap_command(mode, dict, lhs) result.
        See Mapping.get_unmap_command().

                                Vital.Mapping.get_all_modes()
get_all_modes()
        Returns string which represents all mode characters ("noiclxs").
        NOTE: "v" is not contained. Because "x" and "s" already mean "v".

                                Vital.Mapping.get_all_modes_list()
get_all_modes_list()
        Returns List which represents all mode characters.
        Same as split(get_all_modes(), '\zs') .
        See Mapping.get_all_modes().

                                Vital.Mapping.get_abbr_command()
get_abbr_command({mode}, {dict}, {lhs}, {rhs})
        Constructs :abbreviate command string.
        {mode} is a character of mode.
        {dict} is a Dictionary of options.
        {lhs} and {rhs} are strings of lhs/rhs of :map command.
        The options can be created by Mapping.options_chars2dict() or
        maparg()'s return value when {dict} is non-zero.

                                Vital.Mapping.get_map_command()
get_map_command({mode}, {dict}, {lhs}, {rhs})
        Constructs :map command string.
        {mode} is a character of mode.
        {dict} is a Dictionary of options.
        {lhs} and {rhs} are strings of lhs/rhs of :map command.
        The options can be created by Mapping.options_chars2dict() or
        maparg()'s return value when {dict} is non-zero.

                                Vital.Mapping.get_unabbr_command()
get_unabbr_command({mode}, {dict}, {lhs})
        Constructs :unabbreviate command string.
        {mode} is a character of mode.
        {dict} is a Dictionary of options.
        {lhs} is a string of lhs of :map command.
        The options can be created by Mapping.options_chars2dict() or
        maparg()'s return value when {dict} is non-zero.

                                Vital.Mapping.get_unmap_command()
get_unmap_command({mode}, {dict}, {lhs})
        Constructs :unabbreviate command string.
        {mode} is a character of mode.
        {dict} is a Dictionary of options.
        {lhs} is a string of lhs of :map command.
        The options can be created by Mapping.options_chars2dict() or
        maparg()'s return value when {dict} is non-zero.

                                Vital.Mapping.options_chars2dict()
options_chars2dict({chars})
        {chars} is a string which represents characters of options.
        The return value is a Dictionary which is same as maparg()'s
        return value when {dict} is non-zero.

        chars   key
        "e"     expr
        "b"     buffer
        "s"     silent
        "S"     script
        "u"     unique
        "r"     noremap (inverse)
        "n"     nowait

        Example:
        options_chars2dict("bs") = {
          "expr": 0,
          "buffer": 1,
          "silent": 1,
          "script": 0,
          "unique": 0,
          "noremap": 1,
          "nowait": 0,
        }

                                Vital.Mapping.options_chars2raw()
options_chars2raw({chars})
        Same as options_dict2raw(options_chars2dict(chars)) .
        See Mapping.options_dict2raw() and Mapping.options_chars2dict().

        Example:
        options_dict2chars('eb') = '<expr><buffer>'

                                Vital.Mapping.options_dict2chars()
options_dict2chars({dict})
        Converts {dict} to characters of options.

        Example:
        options_dict2chars({'expr': 1, 'buffer': 1}) = 'eb'

                                Vital.Mapping.options_dict2raw()
options_dict2raw({dict})
        {dict} is a Dictionary which represents options.
        See Mapping.options_chars2dict() for the options.

        Example:
        options_dict2raw({'expr': 1, 'buffer': 1}) = '<expr><buffer>'

                                Vital.Mapping.is_mode_char()
is_mode_char({char})
        Returns non-zero if {char} is a character one of
        "v", "n", "o", "i", "c", "l", "x", "s".

==============================================================================
vim:tw=78:fo=tcq2mM:ts=8:ft=help:norl

top - main help file - tag index