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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
<div align="center">
<h1>
*modal*
</h1>
</div>
<div align="center">
modal is a status line colorizer for vis
</div>
# Installation
To install vis-modal, clone this repository in your `~/.config/vis/plugins/` directory
Then, you can use it with the default configuration by putting this into your `~/.config/vis/visrc.lua`:
```
local modal = require('plugins/vis-modal')
```
# Customization
You can change the colors and mode descriptors in vis-modal to your liking, with this template:
```
local modal = require('plugins/vis-modal')
modal.MODES = {
[vis.modes.NORMAL] = ' NORMAL ',
[vis.modes.INSERT] = ' INSERT ',
[vis.modes.VISUAL] = ' VISUAL ',
[vis.modes.REPLACE] = ' REPLACE ',
[vis.modes.VISUAL_LINE] = ' VISUAL_LINE ',
[vis.modes.OPERATOR_PENDING] = ' OPERATOR_PENDING '
}
modal.STYLES = {
[vis.modes.NORMAL] = {
REGULAR = 'fore:default,back:yellow',
INVERTED = 'fore:yellow,back:black',
},
[vis.modes.INSERT] = {
REGULAR = 'fore:default,back:green',
INVERTED = 'fore:green,back:black',
},
[vis.modes.VISUAL] = {
REGULAR = 'fore:default,back:magenta',
INVERTED = 'fore:magenta,back:black',
},
[vis.modes.REPLACE] = {
REGULAR = 'fore:default,back:blue',
INVERTED = 'fore:blue,back:black',
},
[vis.modes.VISUAL_LINE] = {
REGULAR = 'fore:default,back:magenta',
INVERTED = 'fore:magenta,back:black',
},
[vis.modes.OPERATOR_PENDING] = {
REGULAR = 'fore:default,back:blue',
INVERTED = 'fore:blue,back:black',
},
UNFOCUSED = {
REGULAR = 'fore:default,back:white',
INVERTED = 'fore:white,back:black',
},
}
```
|