Git Product home page Git Product logo

p5-neovim-ext's Introduction

NAME

Neovim::Ext - Perl bindings for neovim

DESCRIPTION

Perl interface to Neovim

FUNCTIONS

from_session( $session )

Create a new Nvim instance for $session.

start_host( $session )

Promote the current process into a perl plugin host for Nvim. It starts the event loop for $session, listening for Nvim requests and notifications, and also registers Nvim commands for loading/unloading perl plugins.

METHODS

call( $name, @args )

Call a vimscript function.

chdir( $path )

Set the Nvim current directory.

close( )

Close the Nvim session.

command( $string, @args)

Execute a single ex command.

command_output( )

Execute a single ex command and return the output.

err_write( $msg )

Print $msg as an error message. Does not append a newline and won't be displayed if a linefeed is not sent.

err_writeln( $msg )

Print $msg as an error message. Appends a newline so the buffer is flushed and displayed.

eval( $string, @args )

Evaluate a vimscript expression

exec_lua( $code, @args )

Execute lua code.

feedkeys ($keys, [$options, $escape_csi])

Push $keys< to Nvim user input buffer. Options can be a string with the following character flags:

  • "m"

    Remap keys. This is the default.

  • "n"

    Do not remap keys.

  • "t" Handle keys as if typed; otherwise they are handled as if coming from a mapping. This matters for undo, opening folds, etc.

foreach_rtp( \&cb )

Invoke \&cb for each path in 'runtimepath'.

input( $bytes )

Push $bytes to Nvim's low level input buffer. Unliked feedkeys() this uses the lowest level input buffer and the call is not deferred.

list_runtime_paths( )

Return a list reference of paths contained in the 'runtimepath' option.

list_uis( )

Gets a list of attached UIs.

next_message( )

Block until a message (request or notification) is available. If any messages were previously enqueued, return the first in the queue. If not, the event loop is run until one is received.

out_write( $msg, @args )

Print $msg as a normal message. The message is buffered and wont display until a linefeed is sent.

quit( [$quit_command])

Send a quit command to Nvim. By default, the quit command is qa! which will make Nvim quit without saving anything.

replace_termcodes( $string, [$from_part, $do_lt, $special] )

Replace any terminal code strings by byte sequences. The returned sequences are Nvim's internal representation of keys. The returned sequences can be used as input to feekeys().

request( $name, @args)

Send an API request or notification to Nvim.

run_loop($request_cb, $notification_cb, [$setup_cb, $err_cb] )

Run the event loop to receive requests and notifications from Nvim. This should not be called from a plugin running in the host, which already runs the loop and dispatches events to plugins.

stop_loop( )

Stop the event loop.

strwidth( $string )

Return the number of display cells $string occupies.

subscribe( $event )

Subscribe to an Nvim event.

unsubscribe( $event )

Unsubscribe from an Nvim event.

AUTHOR

Jacques Germishuys [email protected]

LICENSE AND COPYRIGHT

Copyright 2019 Jacques Germishuys.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.