easymotion / vim-easymotion

Vim motions on speed!
http://www.vim.org/scripts/script.php?script_id=3526
7.44k stars 357 forks source link

Searching non english text without keyboard layout switches? #431

Open dnezamaev opened 4 years ago

dnezamaev commented 4 years ago

My text often contains two languages: english and russian. Assume I have such text:

Русский текст и еще текст.

and want to find те.

What I do:

  1. Starting in normal mode with english layout I do easymotion-overwin-f2.
  2. Switch to russian.
  3. Type те. All occurrences are highlighted with english marks.
  4. Switch back again to english and select the mark to jump.

In short it looks like: s<Switch>те<Switch>a. Where s is mapping for EasyMotion action, <Switch> is keyboard layout switching, a is mark to jump (red A).

The problem here are these annoying switchings. The search with standard / can be done much easier because of this solution. It saves keyboard layout for search and input modes, while normal mode will always be english (it is really important, nothing works correctly in non-english layout for normal mode). Is there same feature with EasyMotion? Of course, I can try to let g:EasyMotion_keys to some russian chars, but I still must switch back after jump.

So my question - what can be done to remove these language switches?

P.S. Also I posted question on StackExchange. Would be nice, if you answer to it as plugin creator, many people use this cool thing.

zig5000 commented 2 years ago

Hi did you find solution for that problem ?

zig5000 commented 2 years ago

If you don't find solution you can try my simple patch for it https://github.com/zig5000/vim-easymotion-langmap