Command and keyboard shortcut for transpose letters/word #5591
Replies: 8 comments
-
Transposing is accomplished by rising the contents of selections with <input name="about-you" id="about" /> I would first select the whole line Note that this generalizes to arbitrary numbers of selections, in which you are literally rotating the contents through each selection. This is part of the genius that sets kakoune, the basis of helix's interaction model, above vim, IMO. |
Beta Was this translation helpful? Give feedback.
-
I'm going to be perfectly candid, here. I'm still working through your instructions, and haven't been able to make them work yet. I think part of the problem is terminology, (What does it mean to isolate the things I want to transpose, for example). But, assuming that all works for transposing words, I still think you (developers of Helix) should consider a shorter way to transpose letters. Its something that comes up a lot in programming, and is bound to a single keystroke in many editors. |
Beta Was this translation helpful? Give feedback.
-
We support a number of readline keybindings in insert mode, I don't see the harm in implementing the letter transpose binding there as well. I'm of neutral opinion on having it in normal mode, but I'm also just a minor contributor. |
Beta Was this translation helpful? Give feedback.
-
Here is a quick demo. You might notice that, at first, I tried Alt-0 instead of Alt-(. helixRotateDemo.movOne other quick note. I am on macOS using iterm2. The Alt-( combo did not work until I set "Left Option key:" to "Esc+". This can be found under Preferences ->Profiles -> Keys. |
Beta Was this translation helpful? Give feedback.
-
@anthonyjclark Unrelated, what theme are you using? I'm noticing there's no cursor head rendered on the second selection |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
@archseer I was using bogster. I can confirm that I see multiple cursors when I change to, for example, onedark. |
Beta Was this translation helpful? Give feedback.
-
@anthonyjclark Seems that the theme only provides a |
Beta Was this translation helpful? Give feedback.
-
I'm new to the Vim-like editor world, so there may already be a way to easily transpose adjacent letters/words. If so, please interpret this as a documentation/tutorial request. If not, it would be nice to have a single gesture keybinding to transpose letters/words.
Beta Was this translation helpful? Give feedback.
All reactions