Home Explore Blog CI



neovim

14th chunk of `runtime/doc/api.txt`
e4e32ec8b08289b47d62d360cbedf966da95b5592156e6540000000100000fba
 whether to return all matches or only the first

    Return: ~
        list of absolute paths to the found files

nvim_get_var({name})                                          *nvim_get_var()*
    Gets a global (g:) variable.

    Attributes: ~
        Since: 0.1.0

    Parameters: ~
      • {name}  Variable name

    Return: ~
        Variable value

nvim_get_vvar({name})                                        *nvim_get_vvar()*
    Gets a v: variable.

    Attributes: ~
        Since: 0.1.0

    Parameters: ~
      • {name}  Variable name

    Return: ~
        Variable value

nvim_input({keys})                                              *nvim_input()*
    Queues raw user-input. Unlike |nvim_feedkeys()|, this uses a low-level
    input buffer and the call is non-blocking (input is processed
    asynchronously by the eventloop).

    To input blocks of text, |nvim_paste()| is much faster and should be
    preferred.

    On execution error: does not fail, but updates v:errmsg.

    Note: ~
      • |keycodes| like <CR> are translated, so "<" is special. To input a
        literal "<", send <LT>.
      • For mouse events use |nvim_input_mouse()|. The pseudokey form
        `<LeftMouse><col,row>` is deprecated since |api-level| 6.

    Attributes: ~
        |api-fast|
        Since: 0.1.0

    Parameters: ~
      • {keys}  to be typed

    Return: ~
        Number of bytes actually written (can be fewer than requested if the
        buffer becomes full).

                                                          *nvim_input_mouse()*
nvim_input_mouse({button}, {action}, {modifier}, {grid}, {row}, {col})
    Send mouse event from GUI.

    Non-blocking: does not wait on any result, but queues the event to be
    processed soon by the event loop.

    Note: ~
      • Currently this doesn't support "scripting" multiple mouse events by
        calling it multiple times in a loop: the intermediate mouse positions
        will be ignored. It should be used to implement real-time mouse input
        in a GUI. The deprecated pseudokey form (`<LeftMouse><col,row>`) of
        |nvim_input()| has the same limitation.

    Attributes: ~
        |api-fast|
        Since: 0.4.0

    Parameters: ~
      • {button}    Mouse button: one of "left", "right", "middle", "wheel",
                    "move", "x1", "x2".
      • {action}    For ordinary buttons, one of "press", "drag", "release".
                    For the wheel, one of "up", "down", "left", "right".
                    Ignored for "move".
      • {modifier}  String of modifiers each represented by a single char. The
                    same specifiers are used as for a key press, except that
                    the "-" separator is optional, so "C-A-", "c-a" and "CA"
                    can all be used to specify Ctrl+Alt+click.
      • {grid}      Grid number if the client uses |ui-multigrid|, else 0.
      • {row}       Mouse row-position (zero-based, like redraw events)
      • {col}       Mouse column-position (zero-based, like redraw events)

nvim_list_bufs()                                            *nvim_list_bufs()*
    Gets the current list of buffers.

    Includes unlisted (unloaded/deleted) buffers, like `:ls!`. Use
    |nvim_buf_is_loaded()| to check if a buffer is loaded.

    Attributes: ~
        Since: 0.1.0

    Return: ~
        List of buffer ids

nvim_list_chans()                                          *nvim_list_chans()*
    Get information about all open channels.

    Attributes: ~
        Since: 0.3.0

    Return: ~
        Array of Dictionaries, each describing a channel with the format
        specified at |nvim_get_chan_info()|.

nvim_list_runtime_paths()                          *nvim_list_runtime_paths()*
    Gets the paths contained in |runtime-search-path|.

    Attributes: ~
        Since: 0.1.0

    Return: ~
        List of paths

nvim_list_tabpages()                                    *nvim_list_tabpages()*
    Gets the current list of |tab-ID|s.

Title: Nvim API: Variable Access, User Input, Mouse Events, and Listing Buffers/Channels/Paths/Tabpages
Summary
This section covers Nvim API functions related to accessing variables (`nvim_get_var()`, `nvim_get_vvar()`), queuing user input (`nvim_input()`), sending mouse events (`nvim_input_mouse()`), and listing various editor components such as buffers (`nvim_list_bufs()`), channels (`nvim_list_chans()`), runtime paths (`nvim_list_runtime_paths()`), and tabpages (`nvim_list_tabpages()`).