@@ -7,21 +7,21 @@ If you change the code, you need to run::
7
7
8
8
for the changes to have effect.
9
9
10
- Alternatively you could execute Neovim with the ``$PYTHONPATH `` environment variable::
10
+ Alternatively you could execute Nvim with the ``$PYTHONPATH `` environment variable::
11
11
12
12
PYTHONPATH=/path/to/pynvim nvim
13
13
14
14
But note this is not completely reliable,
15
15
as installed packages can appear before ``$PYTHONPATH `` in the python search path.
16
16
17
17
You need to rerun this command if you have changed the code,
18
- in order for Neovim to use it for the plugin host.
18
+ in order for Nvim to use it for the plugin host.
19
19
20
20
To run the tests execute::
21
21
22
22
python -m pytest
23
23
24
- This will run the tests in an embedded instance of Neovim , with the current
24
+ This will run the tests in an embedded instance of Nvim , with the current
25
25
directory added to ``sys.path ``.
26
26
27
27
If you want to test a different version than ``nvim `` in ``$PATH `` use::
@@ -30,11 +30,11 @@ If you want to test a different version than ``nvim`` in ``$PATH`` use::
30
30
31
31
Alternatively, if you want to see the state of nvim, you could use::
32
32
33
- export NVIM_LISTEN_ADDRESS =/tmp/nvimtest
34
- xterm -e "nvim -u NONE"&
33
+ export NVIM =/tmp/nvimtest
34
+ xterm -e "nvim --listen $NVIM - u NONE" &
35
35
python -m pytest
36
36
37
- But note you need to restart Neovim every time you run the tests!
37
+ But note you need to restart Nvim every time you run the tests!
38
38
Substitute your favorite terminal emulator for ``xterm ``.
39
39
40
40
Contributing
@@ -58,7 +58,7 @@ If you have `tox`_, you can test with multiple python versions locally:
58
58
Troubleshooting
59
59
---------------
60
60
61
- You can run the plugin host in Neovim with logging enabled to debug errors::
61
+ You can run the plugin host in Nvim with logging enabled to debug errors::
62
62
63
63
NVIM_PYTHON_LOG_FILE=logfile NVIM_PYTHON_LOG_LEVEL=DEBUG nvim
64
64
@@ -75,18 +75,18 @@ Usage through the Python REPL
75
75
76
76
A number of different transports are supported,
77
77
but the simplest way to get started is with the python REPL.
78
- First, start Neovim with a known address (or use the ``$NVIM_LISTEN_ADDRESS `` of a running instance)::
78
+ First, start Nvim with a known address (or use the ``v:servername `` of a running instance)::
79
79
80
- NVIM_LISTEN_ADDRESS= /tmp/nvim nvim
80
+ nvim --listen /tmp/nvim.sock
81
81
82
82
In another terminal,
83
- connect a python REPL to Neovim (note that the API is similar to the one exposed by the `python-vim bridge `_):
83
+ connect a python REPL to Nvim (note that the API is similar to the one exposed by the `python-vim bridge `_):
84
84
85
85
.. code-block :: python
86
86
87
87
>> > from pynvim import attach
88
- # Create a python API session attached to unix domain socket created above:
89
- >> > nvim = attach(' socket' , path = ' /tmp/nvim' )
88
+ # Create a session attached to Nvim's address (`v:servername`).
89
+ >> > nvim = attach(' socket' , path = ' /tmp/nvim.sock ' )
90
90
# Now do some work.
91
91
>> > buffer = nvim.current.buffer # Get the current buffer
92
92
>> > buffer[0 ] = ' replace first line'
@@ -99,7 +99,7 @@ connect a python REPL to Neovim (note that the API is similar to the one exposed
99
99
100
100
.. _`python-vim bridge` : http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python-vim
101
101
102
- You can embed Neovim into your python application instead of binding to a running neovim instance:
102
+ You can embed Nvim into your python application instead of binding to a running neovim instance:
103
103
104
104
.. code-block :: python
105
105
0 commit comments