mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 7.4.1244
Problem: The channel functions don't sort together. Solution: Use a common "ch_" prefix.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user