All Projects → fritzy → Node Neovim

fritzy / Node Neovim

NeoVIM RPC lib for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

#Neovim Node RPC/Plugin Library

Install

npm install neovim

Usage

Types and functions are registered under the plugin RPC

var VimPlugin = require('neovim');
var util = require('util');
var async = require('async');

var UNIX = '/tmp/neovim1'

var vim = new VimPlugin(UNIX, function () {
    async.series([
        function (scb) {
            vim.rpc.command('au VimResized <buffer> call rpcnotify(0, "resized")', scb);
        },
        function (scb) {
            vim.rpc.subscribe("resized", scb);
        },
        function (scb) {
            vim.on('resized', function () {
                vim.rpc.get_current_window(function (window) {
                    window.get_height(function (height) {
                        window.get_width(function (width) {
                            console.log(util.format("size changed to: %dx%d", height, width));
                        });
                    });
                });
            });
            scb();
        }],
        function () {
            console.log("go ahead and resize the neovim window");
        }
    );
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].