Closed benwoodward closed 3 years ago
This is a reasonable feature request indeed. It does, however, pose several implementation challenges:
gg
work the other way around - they move the cursor itself, which is being followed by the window. To handle them reliably, the plugin will need to learn this difference, probably by switching between different scrolling styles depending on what command triggered movement.gggqG
. The plugin will need to detect such cases, and either skip the animation, or delay executing further commands until the animation ends. Otherwise, subsequent commands would be applied to incorrect ranges.gg
, that means supporting [count]
and 'startofline'
at least.Similar issues apply to implementing other cursor movement commands, such as f.ex. [[
and {
.
@benwoodward @hendry3k
Try #21 with the following configuration -
silent! map <unique> gg <Plug>(Smoothie_gg)
silent! map <unique> G <Plug>(Smoothie_G)
and please report bugs, if any
@subnut Works well! Great work.
gg
and G
support has landed on master 🎉 To enable it, you can either set up custom mappings in your vimrc (as @subnut described above), or you can let g:smoothie_experimental_mappings=v:true
and have them defined automatically along with the rest of default mappings.
Not a super-necessary feature, but sublime text does this and it gives you a sense of how long the file is when you see it scroll past.