danth / pathfinder.vim

Vim plugin to suggest better movements

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Display start and end cursor positions

danth opened this issue · comments

Sometimes, if pathfinding takes a while, you can forget what motion you did so the suggestion isn't very useful. I originally thought to highlight the positions in the buffer - but that wouldn't work if the user entered insert mode and deleted something while it was running.

Therefore, I suggest displaying a snapshot of the characters around the start and target within the suggestion window. Maybe a 5x5 area around the cursor. This could be placed above the suggestion, or put the start to the left and the target to the right so the popup doesn't get too tall.

Use colors to make it look different from the suggestion text - perhaps even use the original syntax highlighting if that is possible.

This would be disabled by default since it takes up a lot of screen space.

Of course I'm open to other suggestions if someone has a better idea of how to display it.

Now that the popup is not fixed at the bottom of the screen, this could be done by placing it above the target position rather than the cursor.