https://github.com/bourgeoisbear/vim-wscli
websocket test client for Vim
https://github.com/bourgeoisbear/vim-wscli
neovim neovim-plugin vim vim-plugin websocket websocket-cli websocket-client
Last synced: 11 months ago
JSON representation
websocket test client for Vim
- Host: GitHub
- URL: https://github.com/bourgeoisbear/vim-wscli
- Owner: BourgeoisBear
- License: other
- Created: 2022-10-28T00:30:15.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-28T00:54:40.000Z (about 3 years ago)
- Last Synced: 2025-01-12T05:27:32.651Z (about 1 year ago)
- Topics: neovim, neovim-plugin, vim, vim-plugin, websocket, websocket-cli, websocket-client
- Language: Vim Script
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-wscli
A websocket test client for Vim

## Installation
Requires *wscli*:
```sh
go install -v github.com/BourgeoisBear/wscli
```
Then clone this plugin into your Vim plugins directory:
```sh
cd ~/.vim/pack/plugins/start
git clone https://github.com/BourgeoisBear/vim-wscli
```
Rebuild helptags with `:helptags ALL`, then see `:help wscli` for more options.
## Commands
```
Connect to Websocket
\dial ws://127.0.0.1:8080/ws
Disconnect from Websocket
\hup
Send Message (heredoc format)
\msg [message terminator]
message line 1
message line 2
message line 3
[message terminator]
(default terminator is a blank line if left unspecified)
Specify HTTP Headers
Authorization: awo875pu84uj6paj436up
Content-Type: application/json
List Specified HTTP Headers
\hdrlst
Clear Specific HTTP Header (key without value)
Authorization:
Clear All Specified HTTP Headers
\hdrclr
```
## Usage
| Command | Description |
| -------------- | --------------------------------------------------------- |
| `:WscliToggle` | open/close wscli websocket session in new terminal window |
| `ws` | *NORMAL MODE*: send paragraph under cursor to wscli |
| `ws` | *VISUAL MODE*: send visual selection to wscli |
*NOTE*: `ws` will automatically open a new `wscli` session if one is not already open.