Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 2.73 KB

folding.org

File metadata and controls

57 lines (43 loc) · 2.73 KB

Folding

OrgExtended supports standard visibility cycling within a node.

images/orgfolding.gif

Tab Cycling

One of the most important keybindings is org_tab_cycling This is a context aware tab mode that will handle tab insertion vs header collapsing. This binding is setup by default for a variety of cases. If it is causing you grief you can dig into how it is setup in the Default.sublime-keymap in this package.

images/headings.gif

This single key binding enables the “magic” of org tab cycling.

  • Pressing tab on a heading will cycle it through unfolded, folded, first level headings only
  • Pressing tab on a source block will fold it away so you don’t have to look at it.
  • Pressing tab on Properties and property drawers will automatically be folded for you.
  • Pressing tab on Links will fold the links away for you so you don’t have to see the full link.
  • Pressing tab outside of any headings will cycle the entire document through Overview, Table Of “Contents” view and Show All modes. This is a very powerful way to quick get a view of your document from a birds eye view.

Global Tab Cycling

  • Global tab cycling can be done at the top of the document, but it can also be done on any heading by pressing shift+tab
  • This can often be useful as a quick way of narrowing your focus to just a single heading. In emacs I would narrow the buffer to just the current subtree. We cannot do that in sublime so, second best is to fold everything other than the heading you want to work on.

images/global_tab_cycling.gif

Commands

Sublime Org Mode supports quite a few commands:

  • Org Fold All - Fold everything in the file.
  • Org Unfold All - Unfold everything in the file.
  • Org Fold Contents - Fold all the contents of all the headings (Table Of Contents view)
  • Org Remove All Folds - Remove all the folds in the file (show everything)
  • Org Fold Thing - Fold an item within a heading (drawer, block etc)
  • Org Fold All Links - Fold all links within the document

These commands can be bound to keybindings of your choice to help you naviate the file.

Caveats

Occasionally you can get yourself into a bad folding state. I am working to ensure these cannot happen, however, since we use custom folds sometimes your folds can be made or shift to wonky places. IF this happens, re-save your file and run the OrgRemoveAllFolds command.

This will update the backing representation of the file and clear all folds from the file.