https://github.com/yaasita/edit-slack.vim
I have updated my slack plugin because it was not working.
What is this
This is a plugin to post to slack from vim.
You can send a message using only vim.
This is a post from vim to slack via a binary written in golang
(c) gopher stickers
The display will invoke the command if the buffer name starts with "slack://".
autocmd BufReadCmd slack://* call edit_slack#Open(expand("<amatch>"))
The post gets the part written below "=== Message ===" in vimscript.
vim passes it in the standard input of the command.
Run the following script when you write
autocmd BufWriteCmd slack://* call edit_slack#Write(expand("<amatch>"))
Call system() in the function
call system(command, postdata)
Update details are as follows.
Upgrade golang
Updated golang version to 1.15.
I've also added the use of Module and slack-go.
Support for slack's new API
Support new token
YouTube:Change to use ConversationsAPI
All channels can be opened with the following rules
# list
slack://ch
# channel
slack://ch/<channel name>
Threaded support
# Threaded uri
slack://ch/<channel name>/<timestamp>
Added the command :EditSlackOpenReplies
to open threads.
You need to get the timestamp for each statement to open the thread. I used to show it in the message list, but it got too cluttered and hard to read, so I hid it with the conceal function.
If you set syntax on, it will be hidden.
If you change []
to [x]
, you can also post to the channel.
However, there is a bug in slack that causes the name and icon to belong to the application.
Joining and leaving the channel
:EditSlackJoin
/ :EditSlackLeave
Uploading and downloading files
Added support for downloading and uploading files.
:EditSlackDownloadFile /path/to/savefile
:EditSlackUploadFile /path/to/uploadfile
Search command
Added a search function.
:EditSlackSearch search_word
Other functions
It may support reaction functions in the future.
Top comments (0)