edit-slack.vim


Ⅰ. 插件描述

Open slack, like a file

Ⅱ. 基本信息

创建日期:  2016-12-07
使用用户:  3
Github星:  51
插件作者:  yaasita

Ⅲ. 安装方法

使用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

demogif

Installation

1. download vim script

  • vim-plug

    • Plug 'yaasita/edit-slack.vim'
  • NeoBundle

    • NeoBundle 'yaasita/edit-slack.vim'
  • Vundle

    • 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

Save binary under edit-slack.vim directory.
Rename the file name to edit-slack (windows user is edit-slack.exe)

  1. 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

uri

# 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

mechanizm

(c) gopher stickers

添加新评论