Skip to content

Commit 4af3197

Browse files
committed
Improve python API: Adapt README.
1 parent 6551416 commit 4af3197

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,9 @@ similar to the one exposed by the [python-vim
2727
bridge](http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python-vim))
2828

2929
```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')
3533
# Now do some work.
3634
>>> buffer = nvim.buffers[0] # Get the first buffer
3735
>>> buffer[0] = 'replace first line'

0 commit comments

Comments
 (0)