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

Horizontal edgemotion #7

Open
mwgkgk opened this issue Sep 26, 2018 · 1 comment
Open

Horizontal edgemotion #7

mwgkgk opened this issue Sep 26, 2018 · 1 comment

Comments

@mwgkgk
Copy link

mwgkgk commented Sep 26, 2018

I had a feeling that I was lacking something:

map <M-j> <Plug>(edgemotion-j)
map <M-k> <Plug>(edgemotion-k)
" Poor man's horizontal edgemotion
map <M-h> B
map <M-l> E

But really edgemotion works differently than B/E. Next I tried to implement it using vim-patternjump, but still I couldn't quite express it with the regexes; before peeking at edgemotion source to see islands in sea describing the logic.

Please close if you don't find the idea interesting, I will probably try to implement this on my own at some point 💚

@Asheq
Copy link

Asheq commented Jan 18, 2019

B and E are easy to press and don't need an alias.

I use <C-h> and <C-l> as aliases for ^ and $, which are harder to press and thus more desperately need easier alternatives. They are more useful approximations of a horizontal equivalent of edge-motion.

nmap     <silent> <C-h>           ^
xmap     <silent> <C-h>           ^
omap     <silent> <C-h>           ^
nmap     <silent> <C-l>           $
xmap     <silent> <C-l>           $
omap     <silent> <C-l>           $

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