Ⅰ. 插件描述
Open slack, like a fileⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'yaasita/edit-slack-vim'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'yaasita/edit-slack-vim'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'yaasita/edit-slack-vim'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/yaasita/edit-slack.vim
Ⅳ. 文档说明
# edit-slack.vim
Open slack, like a file

Installation
1. download vim script
Plug 'yaasita/edit-slack.vim'
NeoBundle 'yaasita/edit-slack.vim'
Plugin 'yaasita/edit-slack.vim'
Vim packages (since Vim 7.4.1528)
git clone https://github.com/yaasita/edit-slack.vim ~/.vim/pack/plugins/start/edit-slack.vim
2. download edit-slack binary
Linux
FreeBSD
Windows
macOS
Save binary under edit-slack.vim directory.
Rename the file name to edit-slack (windows user is edit-slack.exe)
- Linux(64bit) User
cd /path/to/install/directory/edit-slack.vim
curl -L -O https://github.com/yaasita/edit-slack/releases/download/v0.8.2/linux-amd64-edit-slack
mv linux-amd64-edit-slack edit-slack # windows user is edit-slack.exe
chmod +x edit-slack
Settings
Get token from slack API page.
Add the token to vimrc.
let g:yaasita_slack_token = "xoxp-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx-xxxxxx"
When displaying Unicode characters
set fileencodings+=utf-8
set encoding=utf-8
Usage

# open channels/private group/users list
vim slack://ch
vim slack://pg
vim slack://dm
# gf command opens a chat under the cursor
# open general channel
vim slack://ch/general
# in the vim
:e slack://ch
:tabe slack://dm/hogeuser
# reload
:e
# post
# write it under the "=== Message ===" mark
:w
# search word
vim slack://sw/hoge
vim slack://sw/from:@yamasita_on:today # replace space with _
Mechanism

(c) gopher stickers