karstenpedersen / obsidian-vimium

Interact with elements using keyboard shortcuts in the spirit of Vim.
MIT License
16 stars 3 forks source link

Compatibility issues with built in Vim #13

Open CuteWaterBeary opened 2 days ago

CuteWaterBeary commented 2 days ago

So I really like this plugin and want to keep using it but when running it alongside the built in VIM keybindings it cause an annoying issue:

If I call vimium: show markers then they show up but whatever I press does not get captured by vimium because the VIM keybindings capture it first and do not allow passthrough. The only way I can get vimium to capture the key strokes is to press a first to get into insert mode and then call vimium: show markers.

Is there any way this extra step can be removed? Its most problematic when I'm in a area where there is no insert mode possibility like a side panel.

Maybe making the vimium event listener higher priority than vim?

CuteWaterBeary commented 2 days ago

I tried to figure out a way I could use a shortcut key to run a macro that first send a keypress of the letter a and then does the vimium: show markers command but I could not find a way to send that letter a keypress

CuteWaterBeary commented 2 days ago

A silly method that just crossed my mind would be to prepend A in front of all the generated vimium markers using css