remcmd.vim


Ⅰ. 插件描述

Send commands to remote Vim sessions

Ⅱ. 基本信息

创建日期:  2002-01-11
使用用户:  1
Github星:  1
插件作者:  Hari Krishna Dara

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/remcmd-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/remcmd-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/remcmd-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/vim-scripts/remcmd.vim

Ⅳ. 文档说明

This script came out of my misc utility functions to send some useful commands to a remote Vim session. It basically adds four commands as follows (assuming that your <Leader> is set to ):

    ro - Opens the current file in a remote Vim session.
    re - Executes a command in the remote Vim session.
    ta - Opens the current tag in the remote Vim session.
    ts - Selects the current tag in the remote Vim session.

Each one of the above commands prompts the user to select the name of a remote Vim and executes the command. To make your life easier, it even remembers your previous selection, so repeated execution of remote commands in the same remote Vim session is easy.

Though it adds only 4, it is because I don't know what commans other might like to add. But it is easy enough for you to add your favourite commands this way. It exposes the basic functions necessary to do it yourself from your own script or .vimrc:

       RemCmdServerList(), RemCmdSelectServer(), RemCmdSendRemoteCommand()

Take a look at the script on how to use these functions. For convenience, you can add regular and/or popup menu group for this with the name "Remcmd" by setting some global variables in your .vimrc. Take a look at the script header for details.

添加新评论