psliwka / vim-smoothie

Smooth scrolling for Vim done rightšŸ„¤
MIT License
988 stars 27 forks source link

Allow custom mappings #3

Closed segeljakt closed 4 years ago

segeljakt commented 4 years ago

This makes it possible to disable the default mappings, for example:

let g:smoothie_use_default_mappings = v:false

nmap <C-j> <Plug>(SmoothieDownwards)
nmap <C-k> <Plug>(SmoothieUpwards)

Also, the commit adds so that existing mappings will not be overwritten by the plugin.

expelledboy commented 4 years ago

Was about to send this PR myself, glad I checked, thanks @segeljakt!

psliwka commented 4 years ago

I've adjusted it slightly to use g:smoothie_no_default_mappings flag instead, which seems a bit more idiomatic to me. Thanks a lot, @segeljakt!