obsidian-vimrc-support icon indicating copy to clipboard operation
obsidian-vimrc-support copied to clipboard

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

Open CuteWaterBeary opened this issue 1 year ago • 1 comments

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.

CuteWaterBeary avatar Nov 30 '24 14:11 CuteWaterBeary

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

ko-shin-ryo avatar Dec 10 '24 13:12 ko-shin-ryo