-
Notifications
You must be signed in to change notification settings - Fork 40
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
Sane defaults for movement key remaps #50
Conversation
check for user remaps and use those as a sane default. Fixes #49
Any reason not to merge this? Can I change anything to make it acceptable? |
Sorry for the delay. I haven't had a chance to spend much time with the plugins and will get to this and other proposed changes in next few weeks. |
any update on this? |
Thanks for taking the time to contribute this @dangerginger. I've recently stepped in to help maintain some of Reedes's prose related plugins and have had a gander at this change. It looks sane to me. If you (or @stu-b-doo) are still around and using this it would be great to have a confirmation that it works as expected with your bindings after I merge. I use a remapped keyboard (a dvorak variant) but actually kept the default j/k bindings, so while I can artificially test this it doesn't actually change anything for me in practice. It would be nice to hear that it does the right thing for folks who used various different ways of rebinding j/k motions. |
Hi guys, for some reason this is not working for me, I'm using neovim function! Mapkey (keys, mode) abort
" Pass in a key sequence and the first letter of a vim mode.
" Returns key mapping mapped to it in that mode, else 0 if none.
" example:
" :nnoremap <Tab> :bn<CR>
" :call Mapkey(':bn<CR>', 'n')
" " returns <Tab>
redir => mappings | silent! map | redir END
for map in split(mappings, '\n')
let seq = matchstr(map, '\s\+\zs\S*')
if maparg(seq, a:mode) == a:keys
echom string(seq)
return seq
endif
endfor
endfunction
exe 'nn <buffer> <silent> ' . Mapkey('j', 'n') . ' gj'
" '0'
echom Mapkey('gj', 'n') This maps |
Correct. This commit breaks the Judging by the comment in are treating the |
Thanks for the report @davidsierradz and @pfheatwole, that's a nasty little regression that I didn't notice. I'm in the habit of using |
Hey @davidsierradz and @pfheatwole the regression you encountered should be fixed now. I also touched up a couple other little details such as mapping There are quite a few more things in this department that need some attention. See my notes in #83 and feel free to pitch in with any ideas or concerns. Sorry again about messing this up for you and thanks for the reports. |
Thanks for your work! I appreciate you helping with maintenance. |
Change the remapping of movement keys when Pencil mode is enabled tocheck for user remaps and use those as a sane default.
Fixes #49