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
|
Improved versions of <C-a>, <C-x>, ~, g~, gu, and gU.
They are all implemented as operators, which allows for composing
with motions/textobjecs, dot-repeating, and better undo.
Also, <C-a> and <C-x> are configurable and can "increment" and
"decrement" not only numbers but words as well.
# Installation
If you don't want word toggling:
```lua
require('vis-toggler')
```
If you do:
```lua
toggler_config = require('vis-toggler.example')
toggler = require('vis-toggler')
toggler.config = toggler_config
```
The table to assign to config need not come from a separate
configuration file, it can be defined in and manipulated from
within visrc.lua as well.
Decimal and hexadecimal numbers are supported. If a number has
leading zeros, its width is preserved.
The letter case of a hex number is either that of any existing
letters, of letters in the last inc-/decremented hex number (if
any), or of the base prefix (0x or 0X).
# Ideas for improvement
Improve <C-a>/<C-x> to support filetype-specific radix notation
and sets of words. Add option to force hexadecimal base even
without explicit prefix.
---
Friendly fork of https://repo.or.cz/vis-toggler.git (I hope, the
upstream will merge it back).
All issues, questions, complaints, or (even better!) patches
should be send via email to
[~mcepl/devel@lists.sr.ht](mailto:~mcepl/devel@lists.sr.ht) email
list (for patches use [git send-email](https://git-send-email.io/)).
|