aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: 3cb64dfceecc2b16a2d944347030386db7a99038 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# edit-weechat

This simple [weechat](https://weechat.org/) plugin allows you to
compose messages in your `$EDITOR`, optionally with a file type.

# Usage

- Markdown message (it's the default, same as `/edit md`)
  ```sh
  /edit
  # Type some stuff
  # Save and quit
  ```
- Plain text message
  ```sh
  /edit txt
  # Type some stuff
  # Save and quit
  ```
- Code message with fences added automatically
  ```sh
  /fenced cpp
  # Type some code
  # Save and quit
  ```

# Configuration

If you'd like to customize the editor you use outside of the `$EDITOR`
environment variable, you can set it in weechat.

```sh
/set plugins.var.python.edit.editor "vim -f"
```

# Installation

Copy the script to `~/.weechat/python/autoload`

```
mkdir -p ~/.weechat/python/autoload
wget https://raw.githubusercontent.com/keith/edit-weechat/master/edit.py ~/.weechat/python/autoload
```