Replies: 1 comment
-
|
You're right that rotating selections is a gem! It's essentially applying the same transformation to each selection in order. The sequence is:
Your dictionary invert example works because each cursored key/value pair gets the same substitution pattern with only the current selection active. The _2 reference means the text two lines ahead relative to each selection point. Other patterns:
It's under-documented and worth a tutorial section—multi-cursor iteration makes Helix powerful for bulk edits. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
There is a cool feature not mentioned anywhere in the documentation or tutorial, but well explained in Helix Golf — rotating adjacent selections.
For example we have a map:
We doing
%<A-s>S=<Enter>_2<A-)>And getting:
Please add a mention of this feature to the documentation and include an "Invert Dictionary" example in the tutorial, so that new users can discover and learn about this amazing feature.
Beta Was this translation helpful? Give feedback.
All reactions