index.md - sites - public wiki contents of suckless.org
(HTM) git clone git://git.suckless.org/sites
(DIR) Log
(DIR) Files
(DIR) Refs
---
index.md (1698B)
---
1 vi-mode
2 =======
3 Description
4 -----------
5 With this patch dmenu will have basic vi mode capabilities.
6
7 Implemented actions
8 -------------------
9 * movements inside typed text with `[h|l|w|b|e|0|$]`
10 * movements through list with `[j|k|g|G|C-d|C-u]`
11 * standard insertions with `[a|A|i|I]`
12 * paste after|before cursor with `[p|P]`, use `ctrl` to use clipboard
13 * delete from cursor to eol with `D`
14 * delete the character under cursor with `x`
15
16 *Note* `Enter` and `Tab` work like normal
17
18 Flags
19 -----
20 When `-vi` is passed `Esc` will now put you into `normal mode` instead of
21 quitting `dmenu`.
22
23 Customization
24 -------------
25 This patch defines two `Key` structs made up of a `KeySym` and `ModMask`.
26
27 The first is a single `Key` variable `global_esc` set to `{ XK_n, Mod1Mask }`.
28
29 The second is an array variable `quit_keys`. These keys will be used to quit
30 `dmenu` when using `vi_mode`. If `-vi` was passed this will be the only way to
31 quit `dmenu` besides using `C-c`.
32
33 Set `vi_mode` in `config[.def].h` to `1` to enable `vi_mode` wherever you use
34 `dmenu`. This will not change the behavior of `Esc`. Instead your key defined
35 under `global_esc` will be respected. This is useful as you don't have to change
36 all your scripts to include the `-vi` flag. `vi_mode` is set to `1` by default.
37
38 Set `start_mode` to `1` if you want to start in `normal mode` when the `-vi`
39 flag is passed. Set to `0` by default so that you start in `insert mode`.
40
41 There is a new color scheme included in this patch. It is an inversion of
42 `SchemeNorm` called `SchemeCursor`
43
44 Download
45 --------
46 * [dmenu-vi_mode-20230416-0fe460d.diff](dmenu-vi_mode-20230416-0fe460d.diff)
47
48 Author
49 ------
50 * zerg <zergrusherncrusher at disroot.org>