whonore / Coqtail

Interactive Coq Proofs in Vim
MIT License
274 stars 34 forks source link

feature: automatic CoqJumpToEnd after stepping? #367

Open katrinafyi opened 3 months ago

katrinafyi commented 3 months ago

Hello! Thanks for the plugin, it's a pleasure to use.

I was wondering if there's an option or a suggested way to automatically move the cursor to the end of the checked region, whenever the checked region is changed?

At the moment, I have something like:

map <buffer> L <Plug>CoqNext <Plug>CoqJumpToEnd
map <buffer> H <Plug>CoqUndo <Plug>CoqJumpToEnd

but it would be nice to do this uniformly for all movements, without rebinding the keys. I couldn't find any configuration options to this effect.

Do you have any thoughts? Thanks!

whonore commented 3 months ago

I can't think of a better option than your solution given how things currently work. But, it should be straightforward to change things so it triggers a custom autocommand every time the checked region changed. Then you could do something like

autocmd! User coqtail#CheckedRegionMoved <Plug>CoqJumpToEnd