Is it possible to focus in and out incrementally (ideally with a keyboard short cut)?

I understand that shift-command-A ‘unfolds’ everything, but I was wondering if it was possible to focus in and out one level at a time.

e.g.

Level 1

Lorem ipsum

Level 2

“Quick brown fox”

Level 3

I am here - and have arrived here either by using the alt-command-U short cut, or because I chose to focus while working here. Now I would like to see the “quick brown fox” quote above, without exposing the rest of the document. Is this possible?

I have modified the example keybindings.ftplugin using the focusOut command, but this seems to behave more like ‘Show All’ via shift-command-A. I posted my example code here.

Thanks.

Steve

Not sure whether is is quite what you are after, but there is a plugin for step by step folding and unfolding (expand all one more level, and collapse all one more level) at https://github.com/RobTrew/tree-tools/tree/master/FoldingText%202%20plugins%20and%20scripts

The binding is setup right. But looks like command “focusOut” wasn’t doing what I thought it would. I’m now changing so that it will go level by level.

OK. Thanks. Will watch this space.

Hi Rob

Is it this one you mean?

https://github.com/RobTrew/tree-tools/tree/master/FoldingText%202%20plugins%20and%20scripts/change%20number%20of%20heading%20levels.ftplugin

S

That one reformats the outline - uses ## hash headings down to a chosen N levels of indentation, with tab-indented unordered lists beyond.

The one I had in mind is, on closer reading, not quite what you are after, it’s an expand by level and collapse by level for the whole document (the version in the menu system acts on the current selection).

It’s the Change document expansion level .ftplugin folder here:
https://github.com/RobTrew/tree-tools/tree/master/FoldingText%202%20plugins%20and%20scripts