haya14busa / vim-easymotion

DEPRECATED
https://github.com/Lokaltog/vim-easymotion
23 stars 0 forks source link

A suggestion on SelectLine? #1

Closed jchain closed 10 years ago

jchain commented 10 years ago

I think your SelectLine mode is genius. I tried it and like it. Can you add an option that when I enter v<leader>l, the current line is selected automatically? If so I can only type one more key to select the range. Besides it is more like what vim does by default: jump to the first line and visually select the a batch of lines.

Thanks a lot!

haya14busa commented 10 years ago

I think your SelectLine mode is genius. I tried it and like it.

Thanks. But this feature is implemented by @supasorn. Thanks supasorn!

Can you add an option that when I enter vl, the current line is selected automatically?

Maybe you can do the same things by mapping:

nmap v<leader>l V<Plug>(easymotion-bd-jk)

(bd means bidirection)

Of course, you can map it to another key or use <Plug>(easymotion-j) or <Plug>(easymotion-k) instead of <Plug>(easymotion-bd-jk)

Besides it is more like what vim does by default: jump to the first line and visually select the a batch of lines

Yeah, I think so, too.

  1. First, jump to the first line by using <Plug>(easymotion-j) or <Plug>(easymotion-k)
  2. Second, type V to select line visually.
  3. Third, jump to the destination line by using <Plug>(easymotion-j) or <Plug>(easymotion-k) again
  4. Finally, yank, delete or other operation.

I recommend to follow this procedure. This is more like vim's default.

Thanks.

jchain commented 10 years ago

Thanks. I tried

nmap vv V<Plug>(easymotion-bd-jk)

But it generates an error message like this:

EasyMotion: Vim(if):E121: Undefined variable: search_direction

and there were no red letters (jump hints) showing up. However,

nmap vv <Plug>(easymotion-bd-jk)

works.

Does it work in Visual mode?

haya14busa commented 10 years ago

Oh.. I'm sorry. Please update easymotion. I fixed this bug.

jchain commented 10 years ago

Updated. It worked like a charm. Thank you a billion.

haya14busa commented 10 years ago

Thank you! :+1: