Ⅰ. 插件描述
編集中のファイルをscpでアップロード。upload editing file by scp.Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ryoppy/vim-scp-upload'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ryoppy/vim-scp-upload'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ryoppy/vim-scp-upload'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ryoppy/vim-scp-upload
Ⅳ. 文档说明
scp-upload.vim
編集中のファイルをscpでアップロードすることができます。
送信先のサーバー情報は変数に定義できます。複数登録可能です。
INSTALL
cd ~/.vim/bundle
git clone git://github.com/ryoppy/vim-scp-upload.git
mkdir -p ~/bin
mv ./vim-scp-upload/scp.sh ~/bin
Usage
<leader>scp
Description
以下のように設定ファイルを書いてください。
Please write following like.
let g:vim_scp_configs = {
\ 'sample_server_1' : {
\ 'local_base_path' : '/Users/name/sample/',
\ 'remote_base_path' : '/var/www/sample/',
\ 'user' : 'username',
\ 'pass' : 'password',
\ 'host' : 'ip addess or domain name',
\ 'port' : '22'
\ },
\ 'sample_server_2' : {
\ 'local_base_path' : '/Users/development',
\ 'remote_base_path' : '/var/www/development/trunk/',
\ 'user' : 'username',
\ 'pass' : 'password',
\ 'host' : 'ip addess or domain name',
\ 'port' : '22'
\ }
\}
sample1
Edit file : /Users/name/sample/file.php
Upload to : /var/www/sample/file.php
sample2
Edit file : /Users/name/sample/lib/dao/file.php
Upload to : /var/www/sample/lib/dao/file.php
Alias
別のコマンドがいい場合。
If you want to another command, write following like.
Ctrl+u
`nnoremap <C-U> <ESC>:call ScpUpload()<CR>`