Request feature repeat command
Opened this issue · 6 comments
Would it be possible to add the repeat command, for example when using f<char>
I press ;
in normal mode to repeat.
Thank you :)
This requires a bunch of research on how this mechanism works on Vim, so if you'd like to see it can I request you look into it (via :h
help) and report back here?
How do you decide what is repeated and what isn't? Not clear on it.
I found it under Left-right motions https://neovim.io/doc/user/quickref.html
It's really useful for quickly jumping to the next character.
Edit: I was going to mention Neovim headless but I think that breaks autocomplete if used in an editor. This method you're using is far more flexible and works brilliantly in xcode.
You've done an amazing job with this, I wish I had found it sooner.
If you are interested in adding this, you can clone this repo, and point your ~/.hammerspoon/Spoons/VimMode.spoon
directory at the cloned repo. Then develop using it. I recommend binding a key like hyper + h
to reload your hammerspoon config.
Things to point out:
- We don't track the last motion in the command state:
VimMode.spoon/lib/command_state.lua
Lines 6 to 13 in a900bae
- This is where the motion is fired:
Lines 57 to 70 in a900bae
- All the normal mode keys are bound in here:
Lines 196 to 205 in a900bae
Thank you for pointing me in the right direction. I will give it a shot.
@assertcarlos If you don't end up working on this, please comment back here so I know this is an open request.
Hi @dbalatero I tried working on this but unfortunately ended up giving up after about a day of trying to get it to work.