What is Outline Explorer in Spyder?
Asked Answered
H

3

4

I see it referenced, but never explained what it is.

https://docs.spyder-ide.org/editor.html

Googled without success.

https://docs.spyder-ide.org/editor.html "Providing a description to the right of the separator will give that cell its own name in the Outline Explorer." Sounds like something for Navigating cells? Where do I find it? Are there shortcuts for navigating cells you create?

Thanks!

Hilaryhilbert answered 28/2, 2019 at 12:11 Comment(0)
M
11

In your code you can use this , for example in Spyder before each function ( above line of each function ) write #%% you will see the difference in gui where you will find that block is within a cell/it is outlined.

and in outlined window ( enable views > panes > outlines ) you will see the each block and outline in code

Mouton answered 28/2, 2019 at 12:18 Comment(2)
Thank you! Are there any keyboard shortcuts (or can they be set) for navigating cells in spyder?Hilaryhilbert
@LXandor use ctrl+(Arrow up key) to navigate upwards and ctrl+(arrow downwards) to navigate below cellMouton
G
8

I think the Outline Explorer is made to facilitate navigation inside a long and/or dense Python script. In one look you can see the structure of your script, and you can go directly to whatever was outlined by clicking on it.

From what I've seen until now, outlined elements that will appear in the Outline Explorer are :

To make comment markers appear : write #### YourComment. The space between the four hashes and the text is important ; the code works with four hashes or more.

"YourComment" will appear in your Outline Explorer. If it's in a cell , it will remain in the same cell. I use comment markers for sub-titles, and sometimes to mark where I have to re-work some code.

Gastrotrich answered 20/8, 2019 at 8:51 Comment(0)
F
0

You can go on the begining of your code, then press ctrl+shift+End and after select everything run F9

Fennelflower answered 27/3, 2021 at 22:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.