So I have a case where I have some unicode letters say [B, Ḅ, Ḃ] and when I have my mouse selected over the B, (in normal mode) I want some way of cycling through the list. Like pressing some command should replace B with Ḅ, pressing it again should replace Ḅ with Ḃ.
I looked at this https://github.com/zef/vim-cycle/blob/master/plugin/cycle.vim, but it was not quite what I was looking for as
- It works on words not letters
- I sometimes need multiple groups
Say this is group associated with hotkey A [$ Ɗ Ʋ]
I also need a second group B, with a second hotkey which would cycle [$ ¥], [Ɗ ɗ] and [Ʋ ʋ].
Finally (and I might ask this in a follow up question), very rarely I would need to do a two group cycle. Something like [С, п, Ðḟ, ...] Which would always start with a Ð. Any ideas, or resources to look for?
I tagged this with vimscript Lua, simply because I am open to solving this issue with Lua if it makes it easier.
CyclePairsinstead. Alas, it seems inefficient having to look through 26 groups to see if the char is in one of them. With that being said, this seems like a great start! – N3buchadnezzar Jul 08 '21 at 11:54tr. E.gtr(@", 'ABC', 'BCA')would perform a simple 3 cycle. I'll look into it today and might answer my own question if it works out =) – N3buchadnezzar Jul 08 '21 at 12:38