Open climech opened 3 years ago
The implementation of S
is
{ "S", ALIAS("^c$") },
Since the dot repeat remembers only the last operator, the ^
motion before it is not repeated.
Just found that the alias was originally to "cc" (which can be properly dot-repeated), but was changed - cddf1791,
probably so that it preserves indentation.
(In Vim, both S and cc preserve indentation. In fact, help S
says that it is a synonym for "cc".)
On a similar note, I find a lot of this aliasing problematic. Take for example O
and o
, which I ran into problems with while trying to make smarter indentation when pressing those respective keys. This aliasing makes remapping and adding more functionality much more difficult. In addition, the fact that vis always recursively evaluates keymaps makes many features downright impossible. Are there any plans on making nonrecursive keymaps?, because the combination of recursive keymaps + internal aliasing is an problem where there are no workarounds (at least that I know of).
Given file contents:
(1) In normal mode, place the cursor at
A
and doS-<Esc>
.This gives us:
(2) In normal mode, place the cursor at
B
and use the dot command.Expected result:
Observed result:
Vis version: v0.7 +curses +lua +tre +acl