Neovim的Python客户端。
示例代码:
>>> from neovim import attach# Create a python API session attached to unix domain socket created above:>>> nvim = attach('socket', path='/tmp/nvim')# Now do some work. >>> buffer = nvim.buffers[0] # Get the first buffer>>> buffer[0] = 'replace first line'>>> buffer[:] = ['replace whole buffer']>>> nvim.command('vsplit')>>> nvim.windows[1].width = 10>>> nvim.vars['global_var'] = [1, 2, 3]>>> nvim.eval('g:global_var')[1, 2, 3]
评论