Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MagmaEvaluateRange vim function #109

Closed
wants to merge 2 commits into from

Conversation

benlubas
Copy link

@benlubas benlubas commented Sep 16, 2023

Adds MagmaEvaluateRange to address #108 and partially address #19

For an example of why this is useful, I use it here to run all the code cells above the cursor in a qmd document.

From the README:

Functions

There is a provided function MagmaEvaluateRange(start_line, end_line) which evaluates the code
between the given line numbers (inclusive). This is intended for use in scripts.

Example Usage:

vim.fn.MagmaEvaluateRange(1, 23)
MagmaEvaluateRange(1, 23)
" from the command line
:call MagmaEvaluateRange(1, 23)

@@ -487,6 +498,10 @@ def function_magma_define_cell(self, args: List[int]) -> None:
DynamicPosition(
self.nvim, self.extmark_namespace, bufno, start - 1, 0
),
DynamicPosition(self.nvim, self.extmark_namespace, bufno, end - 1, -1),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accidental formatting change

@benlubas benlubas mentioned this pull request Sep 25, 2023
6 tasks
@benlubas
Copy link
Author

@WhiteBlackGoose I have a couple small quality of life PRs (like this one) up now, would appreciate if you have time to look at them this weekend.

I also have a large draft PR that improves images and showing output. It's still a work in progress, but I'd like some feedback on how a large and potentially breaking change like that should be handled.

@benlubas benlubas closed this Apr 1, 2024
@benlubas benlubas deleted the magma_evaluate_range branch April 1, 2024 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant