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

Fold All Cells (Focus on Current Working Cell) #23290

Open
2 of 9 tasks
PhilipYip1988 opened this issue Dec 15, 2024 · 0 comments
Open
2 of 9 tasks

Fold All Cells (Focus on Current Working Cell) #23290

PhilipYip1988 opened this issue Dec 15, 2024 · 0 comments

Comments

@PhilipYip1988
Copy link

Issue Report Checklist

  • [ x] Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Currently code folding is implemented on the cell level, however there is no quick means to hide all the cells, except the currently highlighted cell.

Supposing the cells 1, 2 and 3 are created:

#%% 1. import libraries
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#%% 2. create data
x = np.array([0, 1, 2, 3, 4])
y = 2 * x
#%% 3. plot data
plt.plot(x, y)

Cell 2 is the current cell (current working cell):

1

To maximise screen space, cell 1 can be collapsed:

3

To maximise screen space, cell 3 can be collapsed:

4

For a very large script file with multiple cells, having to select each other cell individually and show/hide the cell becomes cumbersome. Therefore it would be useful to have fold/unfold all cells buttons in the edit menu with associated shortcuts:

5

What steps reproduce the problem?

What is the expected output? What do you see instead?

Paste Traceback/Error Below (if applicable)

PASTE TRACEBACK HERE

Versions

  • Spyder version: 6.0.3 (standalone)
  • Python version: 3.11.10 64-bit
  • Qt version: 5.15.8
  • PyQt5 version: 5.15.9
  • Operating System: Windows-10-10.0.22631-SP0

Dependencies

PASTE DEPENDENCIES HERE
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

No branches or pull requests

1 participant