psliwka / vim-smoothie

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

Search motions scroll #33

Open vkrajacic89 opened 3 years ago

vkrajacic89 commented 3 years ago

Hi, is it possible to implement scrolling for search motions (e.g. prev/next search result) using existing function smoothie#cursor_movement(movement)? Thanks!

psliwka commented 2 years ago

The current interface to do this would be smoothie#do('n') and smoothie#do('N'). The latter seems to work well, the former not so much (it scrolls to the first occurrence, but then is unable to proceed further). Another problem is that error messages if the pattern is not found are much uglier than with native commands.

basilgood commented 2 years ago

But to actually scroll when I'm in commandline, I press / and type something and smoothscroll comes in, or with <c-g> or <c-t>. In neovim neoscroll does this very well. Thank you for the plugin.

toombs-caeman commented 2 years ago

I've made a PR that addresses n and N movement

basilgood commented 2 years ago

I just tested @toombs-caeman PR and it works perfectly.

https://user-images.githubusercontent.com/16057481/167956422-d183c578-e472-4a20-b797-528bf1d3a238.mp4