dccsillag / magma-nvim

Interact with Jupyter from NeoVim.
GNU General Public License v3.0
977 stars 49 forks source link

[Feature Request] a way to easily run a range of lines #108

Open benlubas opened 11 months ago

benlubas commented 11 months ago

Currently the best way to run an arbitrary block of code is to select it with visual mode and then use :MagmaEvaluateVisual which is itself clunky b/c you have to delete the '<,'> at the front or exit visual mode before running the command.

Either way, this method messes with the visual selection which is not ideal for user defined functions that run blocks of code.

I'd like to expose a vim function :MagmaEvaluateRange which takes a start line and an end line and evaluates those lines in the buffer.

This would enable users to more easily define their own text objects to run code with as mentioned in #19