You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for this wonderful extension.
Say I want to define a command for the 'v' key, that, depending on how many time I press the key in a row, the command shows the current line at the top, center, bottom of the editor pane, respectively.
For example, on the first press of 'v', the command brings the current line to the top. If I press the 'v' key again, it brings the current line to the center. Then on the third press, the line is at the bottom. Pressing the key again, the line goes to the top, so on and so forth.
Right now I have to define three commands like below:
First of all, thanks for this wonderful extension.
Say I want to define a command for the 'v' key, that, depending on how many time I press the key in a row, the command shows the current line at the top, center, bottom of the editor pane, respectively.
For example, on the first press of 'v', the command brings the current line to the top. If I press the 'v' key again, it brings the current line to the center. Then on the third press, the line is at the bottom. Pressing the key again, the line goes to the top, so on and so forth.
Right now I have to define three commands like below:
But it would be better if I can just keep pressing the same key, 'v', to cycle through the three positions.
I'd imagine for such commands to work they will need to carry a state hence the issue's subject "stateful commands".
The text was updated successfully, but these errors were encountered: