File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,9 @@ similar to the one exposed by the [python-vim
27
27
bridge] ( http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python-vim ) )
28
28
29
29
``` python
30
- >> > from neovim import socket_session, Nvim
31
- # Create a msgpack-rpc session to the unix domain socket created by Nvim:
32
- >> > session = socket_session(' /tmp/nvim' )
33
- # Create a Nvim instance from the session(don't call Nvim constructor!):
34
- >> > nvim = Nvim.from_session(session)
30
+ >> > from neovim import attach
31
+ # Create a python API session attached to unix domain socket created above:
32
+ >> > nvim = attach(' socket' , path = ' /tmp/nvim' )
35
33
# Now do some work.
36
34
>> > buffer = nvim.buffers[0 ] # Get the first buffer
37
35
>> > buffer[0 ] = ' replace first line'
You can’t perform that action at this time.
0 commit comments