sponsor Vim development Vim logo Vim Book Ad

vim-remote : Vim clientserver protocol library

 script karma  Rating 4/1, Downloaded by 426    Comments, bugs, improvements  Vim wiki

created by
Yukihiro Nakadaira
 
script type
utility
 
description
Vim clientserver protocol library

License: VIM LICENSE (see :help license)

supported:
  serverlist()
  remote_expr()

not supported:
  remote_foreground()
  remote_peek()
  remote_read()
  remote_send()
  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


Latest source: https://github.com/ynkdir/vim-remote
 
install details
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-remote.zip 1.1 2011-03-05 7.3 Yukihiro Nakadaira Changed API
Added sample ruby server
vim-remote.zip 1.0 2011-03-04 7.3 Yukihiro Nakadaira Initial upload
ip used for rating: 54.91.9.248

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo