NotebookNavigator.nvim icon indicating copy to clipboard operation
NotebookNavigator.nvim copied to clipboard

New Feature: Run Cells Above

Open ESSO0428 opened this issue 9 months ago • 2 comments

New Feature: Run Cells Above (Revert README.md to raw Repo content)

This pull request introduces a new feature run_cells_above to the NotebookNavigator plugin. This function allows users to execute all code cells above the current cell, which is similar to functionality seen in tools like Jupyter notebooks.

Implementation:

  • The function calculates the current cell's position and executes each cell above it.
  • Utilizes the existing infrastructure for running cells but adds logic to determine the scope of execution dynamically based on the cursor's position.

Usage:

Users can invoke this function via a command or keybinding in Neovim. Example usage might be via a mapped key in normal mode, such as below

   ...
    keys = {
      ...
      { "[e", function() require("notebook-navigator").run_cells_above "" end },
    },
   ...

Request for Feedback:

Please review the implementation details and functionality. I am open to suggestions for improvements or additional scenarios that should be considered.

Looking forward to your feedback and hoping for integration into the main project!


Thanks to @IndianBoy42 for pointing this out! This update introduces the new 'Run Cells Above' feature and reverts the changes in README.md to its original content. The changes to the repository name in README.md have been reverted.

ESSO0428 avatar May 24 '24 14:05 ESSO0428