Skip to content

carlosdcastillo/python-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python client to Neovim

Library aims to emulate the current python-vim interface through Neovim msgpack-rpc API

Installation

pip install neovim

Usage

Start Neovim with a known address or query the value of $NEOVIM_LISTEN_ADRESS after startup:

$ NEOVIM_LISTEN_ADDRESS=/tmp/neovim nvim

Open the python REPL with another terminal connect to Neovim:

>>> import neovim
>>> vim = neovim.connect('/tmp/neovim')
>>> vim.buffers[0] = 'replace first line'
>>> vim.buffers[:] = ['replace whole buffer']
>>> vim.command('vsplit')
>>> vim.windows[1].width = 10
>>> vim.vars['global_var'] = [1, 2, 3]
>>> vim.eval('g:global_var')
[1, 2, 3]

This is still alpha and incomplete, use only for testing purposes

About

Python client for Neovim

Resources

License

Stars

Watchers

Forks

Packages

No packages published