[Feature Request]: PC/BP movements
Is your feature request related to a problem? Please describe. Vimspector supports jumping to BP or PC by clicking the breakpoint or frame respectively. This however requires moving over to a different window with either mouse or cursor. It also does not allow for advanced actions as using those movements in visual or operator-pending modes, e.g. to yank text between two breakpoints.
Describe the solution you'd like
Provide <Plug>vimspector#JumpToPC, JumpToNextBP, JumpToPrevBP.
Describe alternatives you've considered
Exposing functions vimspector#GetPC and GetBPs returning line number and buffer number or filename would allow user to implement such functionality themselves, with additional scripting possibilities. There are probably similar private functions at script scope, so exposing them should be easy.
Additional context More than happy to implement those myself, just need to confirm there is no easy way to do it already.
Please can you elaborate on your exact use case. You mention operator pending mappings, but I'm struggling to envisage the exact use case.
OP-mode may be a stretch, I run into it couple times when the breakpoint was at a convenient place to yank text to, but I guess it was more of a coincidence.
I am mostly interested in normal mode mappings, so that I can jump between breakpoints and PC without leaving the code window. Most plugins add visual mode and operator-mode mappings just for consistency, but it is not required.
I could see something like ]B and [B for next-breakpoint and previous-breakpoint (similar to diff mappings [c/[c) working. For jumping to the PC I tend to just use the up/down stack mappings that already exist.
Yeah, exactly like that, will look into implementing it. Should be as easy as comparing list of breakpoints to cursor and calling cursor.
Moving stackframe up/down to jump to PC is a perfectly fine solution 😃