-
Notifications
You must be signed in to change notification settings - Fork 1
/
README
54 lines (37 loc) · 1.06 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Vim clientserver protocol library
License: VIM LICENSE (see :help license)
supported:
serverlist()
remote_send()
remote_expr()
not supported:
remote_foreground()
remote_peek()
remote_read()
server2client()
Example:
Compile vim-remote library.
Linux:
$ make -f Makefile.x11
Windows (VC++):
> nmake -f Makefile.msvc
Windows (MinGW):
> make -f Makefile.mingw
Start the sample python server.
$ python main.py --servername py --server
You can evaluate Python expression with remote_expr().
Start Vim and execute the following command.
:echo remote_expr('py', 'print("This is Python expression")')
None
"None" is result of Python expression.
And the message will be displayed on the console.
Also, it is possible to call client function from server.
:function! F()
: echo "This is Vim expression"
: return "And this is result from Vim"
:endfunction
:let pyexpr = printf('remote_expr("%s", "F()")', v:servername)
:let result = remote_expr('py', pyexpr)
This is Vim expression
:echo result
And this is result from Vim