While #5 is still being worked on trying to fix that RemoteChannel bug, here is a basic visual selection implementation that mimics the VSCode implementation.
Visual and visual-line selection both work, doesn't matter if there is a semicolon, or a inline comment or not. Snippets of a single line can also be evaluated without issue.
The only problem (and why I still want to make #5 work) is that the Virtual text is not shown per-line when evaluating in visual-line mode over many lines. I think that is a nice feature to have, though. Another small 'issue' is that things like for loops can't be evaluated properly visually, but since they are an easy one-command eval with the normal send_command() function I don't think this needs to be implmented here, using the conventional eval is way easier.
While #5 is still being worked on trying to fix that
RemoteChannel
bug, here is a basic visual selection implementation that mimics the VSCode implementation.Visual and visual-line selection both work, doesn't matter if there is a semicolon, or a inline comment or not. Snippets of a single line can also be evaluated without issue.
The only problem (and why I still want to make #5 work) is that the Virtual text is not shown per-line when evaluating in visual-line mode over many lines. I think that is a nice feature to have, though. Another small 'issue' is that things like
for
loops can't be evaluated properly visually, but since they are an easy one-command eval with the normalsend_command()
function I don't think this needs to be implmented here, using the conventional eval is way easier.