yuttie / comfortable-motion.vim

Brings physics-based smooth scrolling to the Vim world!
MIT License
634 stars 19 forks source link

<c-u> and <c-d> did not scroll exactly half page in tmux pane #30

Open nanangarsyad opened 6 years ago

nanangarsyad commented 6 years ago

Recently I just found out that this plugin didn't scroll exactly half page of the screen when I pressed <c-u> or <c-d>. But this weird behavior only happened when I ran vim inside tmux pane.

Here's my vim configuration for this plugin.

" To prevent the plugin from defining those default key mappings
let g:comfortable_motion_no_default_key_mappings = 0

" mouse wheel to scroll a window by the following mappings:
noremap <silent> <ScrollWheelDown> :call comfortable_motion#flick(40)<CR>
noremap <silent> <ScrollWheelUp>   :call comfortable_motion#flick(-40)<CR>

" Scrolling proportional to the window height, you may use settings such as these:
let g:comfortable_motion_impulse_multiplier = 1  " Feel free to increase/decrease this value.
nnoremap <silent> <C-d> :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0) * 2)<CR>
nnoremap <silent> <C-u> :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0) * -2)<CR>
nnoremap <silent> <C-f> :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0) * 4)<CR>
nnoremap <silent> <C-b> :call comfortable_motion#flick(g:comfortable_motion_impulse_multiplier * winheight(0) * -4)<CR>

Thank you

openjck commented 4 years ago

I can confirm that <c-u> and <c-d> scroll than more than half a page for me, but it happens to me whether or not I'm inside tmux.