diff options
Diffstat (limited to 'runtime/tools')
-rw-r--r-- | runtime/tools/demoserver.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runtime/tools/demoserver.py b/runtime/tools/demoserver.py index 0f6a3740c..9f22aa293 100644 --- a/runtime/tools/demoserver.py +++ b/runtime/tools/demoserver.py @@ -1,15 +1,21 @@ #!/usr/bin/python +# # Server that will accept connections from a Vim channel. # Run this server and then in Vim you can open the channel: -# :let handle = connect('localhost:8765', 'json') +# :let handle = ch_open('localhost:8765', 'json') # # Then Vim can send requests to the server: -# :let response = sendexpr(handle, 'hello!') +# :let response = ch_sendexpr(handle, 'hello!') # # And you can control Vim by typing a JSON message here, e.g.: # ["ex","echo 'hi there'"] # +# There is no prompt, just type a line and press Enter. +# To exit cleanly type "quit<Enter>". +# # See ":help channel-demo" in Vim. +# +# This requires Python 2.6 or later. from __future__ import print_function import json |