Read between special comments as well as a visual block #148
ryuheechul
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
Nice idea! There's already something similar for literate programming (markdown and org-mode), so this shouldn't be too hard to make However, I'm a bit conflicted about using a comment, I mean, I don't want people to keep and commit // sniprun in their VCS.... I think we should discuss the technical design a bit more (as well as the behavior you'd like) How do marks (can they be made persitent?) and virtual text indicators sound ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
with an example of below
I could select the visual block of just
Which is fine when I only run it for few times and the lines that I'm selecting is just few lines.
However if I would like to repeat this process, selecting the same (potential many) lines again and again would be undesirable.
So I propose an idea of using special comment for SnipRun to figure out the lines to run
the naming of the special comment is arbitrary choice from just on top of my head (so please suggest any better ones!)
So whenever the cursor is in between
// sniprun:[
and// sniprun:]
,:SnipRun
just figure out which portion of the code to run without having to provide visual selection everytime(additionally the plugin can highlight the special comment so users notice what they means as well)
Beta Was this translation helpful? Give feedback.
All reactions