neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

remote.txt (4954B)


      1 *remote.txt*    Nvim
      2 
      3 
      4 	  VIM REFERENCE MANUAL	  by Bram Moolenaar
      5 
      6 
      7 Vim client-server communication				*client-server*
      8 
      9                                      Type |gO| to see the table of contents.
     10 
     11 ==============================================================================
     12 1. Common functionality					*clientserver*
     13 
     14 Nvim's |RPC| functionality allows clients to programmatically control Nvim. Nvim
     15 itself takes command-line arguments that cause it to become a client to another
     16 Nvim running as a server. These arguments match those provided by Vim's
     17 clientserver option.
     18 
     19 The following command line arguments are available:
     20 
     21    argument			meaning	~
     22 
     23   --remote [+{cmd}] {file} ...					*--remote*
     24 			Open the file list in a remote Vim.  When
     25 			there is no Vim server, execute locally.
     26 			Vim allows one init command: +{cmd}.
     27 			This must be an Ex command that can be
     28 			followed by "|". It's not yet supported by
     29 			Nvim.
     30 			The rest of the command line is taken as the
     31 			file list.  Thus any non-file arguments must
     32 			come before this.
     33 			You cannot edit stdin this way |--|.
     34 			The remote Vim is raised.  If you don't want
     35 			this use >
     36 			 nvim --remote-send "<C-\><C-N>:n filename<CR>"
     37 <
     38   --remote-silent [+{cmd}] {file} ...			*--remote-silent*
     39 			As above, but don't complain if there is no
     40 			server and the file is edited locally.
     41 						*--remote-tab*
     42   --remote-tab			Like --remote but open each file in a new
     43 			tabpage.
     44 						*--remote-tab-silent*
     45   --remote-tab-silent		Like --remote-silent but open each file in a
     46 			new tabpage.
     47 							*--remote-send*
     48   --remote-send {keys}		Send {keys} to server and exit.  The {keys}
     49 			are not mapped.  Special key names are
     50 			recognized, e.g., "<CR>" results in a CR
     51 			character.
     52 							*--remote-expr*
     53   --remote-expr {expr}		Evaluate {expr} in server and print the result
     54 			on stdout.
     55 							*--remote-ui*
     56   --remote-ui			Display the UI of the server in the terminal.
     57 			Fully interactive: keyboard and mouse input
     58 			are forwarded to the server.
     59 							*--server*
     60   --server {addr}		Connect to the named pipe or socket at the
     61 			given address for executing remote commands.
     62 			See |--listen| for specifying an address when
     63 			starting a server.
     64 
     65 Examples ~
     66 
     67 Start an Nvim server listening on a named pipe at '~/.cache/nvim/server.pipe': >
     68    nvim --listen ~/.cache/nvim/server.pipe
     69 
     70 Edit "file.txt" in an Nvim server listening at '~/.cache/nvim/server.pipe': >
     71    nvim --server ~/.cache/nvim/server.pipe --remote file.txt
     72 
     73 This doesn't work, all arguments after --remote will be used as file names: >
     74    nvim --remote --server ~/.cache/nvim/server.pipe file.txt
     75 
     76 Tell the remote server to write all files and exit: >
     77    nvim --server ~/.cache/nvim/server.pipe --remote-send '<C-\><C-N>:wqa<CR>'
     78 
     79 
     80 REMOTE EDITING
     81 
     82 The --remote argument will cause a |:drop| command to be constructed from the
     83 rest of the command line and sent as described above.
     84 Note that the --remote and --remote-wait arguments will consume the rest of
     85 the command line.  I.e. all remaining arguments will be regarded as filenames.
     86 You can not put options there!
     87 
     88 
     89 ==============================================================================
     90 2. Missing functionality			*E5600* *clientserver-missing*
     91 
     92 Vim supports additional functionality in clientserver that's not yet
     93 implemented in Nvim. In particular, none of the "wait" variants are supported
     94 yet. The following command line arguments are not yet available:
     95 
     96    argument			meaning	~
     97 
     98   --remote-wait [+{cmd}] {file} ...				*--remote-wait*
     99 			Not yet supported by Nvim.
    100 			As --remote, but wait for files to complete
    101 			(unload) in remote Vim.
    102   --remote-wait-silent [+{cmd}] {file} ...		*--remote-wait-silent*
    103 			Not yet supported by Nvim.
    104 			As --remote-wait, but don't complain if there
    105 			is no server.
    106 						*--remote-tab-wait*
    107   --remote-tab-wait		Not yet supported by Nvim.
    108 			Like --remote-wait but open each file in a new
    109 			tabpage.
    110 					*--remote-tab-wait-silent*
    111   --remote-tab-wait-silent	Not yet supported by Nvim.
    112 			Like --remote-wait-silent but open each file
    113 			in a new tabpage.
    114 						    *--servername*
    115   --servername {name}          Not yet supported by Nvim.
    116 			Become the server {name}.  When used together
    117                                with one of the --remote commands: connect to
    118                                server {name} instead of the default (see
    119                                below).  The name used will be uppercase.
    120 
    121 							*--serverlist*
    122   --serverlist			Not yet supported by Nvim.
    123 			Output a list of server names.
    124 
    125 
    126 
    127 
    128 SERVER NAME						*client-server-name*
    129 
    130 By default Vim will try to register the name under which it was invoked (gvim,
    131 egvim ...).  This can be overridden with the --servername argument.  Nvim
    132 either listens on a named pipe or a socket and does not yet support this
    133 --servername functionality.
    134 
    135 vim:tw=78:sw=4:ts=8:noet:ft=help:norl: