DCsunset / vscode-modal-editor

Customizable extension to turn VS Code into a modal editor
GNU Affero General Public License v3.0
36 stars 4 forks source link

How exactly does replay work? #18

Open digitalmaster opened 2 months ago

digitalmaster commented 2 months ago

I'm curious how exactly does replayRecord work? How does it decide what gets recorded?

I'm asking because whenever I try to use it does really weird things so I just never use it.

Happy to update docs once I understand it. 🙏🏽

DCsunset commented 2 months ago

For complex command, there is an option called record that can record the key sequence to a register. replayRecord will repeat the key sequence stored in a register.

digitalmaster commented 1 day ago

I'm still pretty lost here 🙈

Ok so let's say I trigger the command dw. For me, this deletes up to start of next word. My goal is to be able to then press . to delete the next word.

dw executes the following commands: ['cursorWordEndRightSelect', 'deleteRight'].

If you have a moment could you take a look at my config? My guess is i'm missing something obvious.

DCsunset commented 18 hours ago

Your config is a bit too long to look into. You can create a simple config that only has the commands, which is easier for us to understand. You can try reading the preset config to understand it better.