Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What mapping could I use in vimrc to make vimium work better with vim? #252

Open
CuteWaterBeary opened this issue Nov 30, 2024 · 1 comment

Comments

@CuteWaterBeary
Copy link

vim normal mode + vimium = vim prevents vimium from capturing keypresses and/or executes its own commands first

vimium requires 1-3 characters after running the command to get it to click on the item wanted but vim interferes with this ability. I've tried various ways to solve this but can't figure out a working method to get it to work it normal mode.

Any ideas would be greatly appreciated.

@ko-shin-ryo
Copy link
Contributor

How about adding the following to the .obsidian.vimrc:

exmap vimium obcommand vimium:show-markers
nmap <C-v> :vimium<CR>i

This mapping calls vimium:show-markers when pressing Ctrl+v in normal mode, and immediately switches to insert mode afterward.

A few notes:

  • The exmap creates a custom command to trigger the Vimium marker display
  • The nmap binds this command to Ctrl+v, which can be easily customized to any preferred key mapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants