Closed asiloisad closed 2 years ago
please consider to add new function:
fold all section, but no section-in-section. as result we get somthink like "table of contents"
export function foldAllNoClose () {
foldAtLevel(1)
foldAtLevel(2)
foldAtLevel(3)
foldAtLevel(4)
foldAtLevel(5)
foldAtLevel(6)
foldAtLevel(7)
}
this function close all section, and we see only the most upper section
export function foldAllClose () {
foldAtLevel(7)
foldAtLevel(6)
foldAtLevel(5)
foldAtLevel(4)
foldAtLevel(3)
foldAtLevel(2)
foldAtLevel(1)
}
Hi, This is relly nice package, it is needed improvment for folding in atom ide. It will be nice, if user can set character of section levels, eg. in python "#" is comment characters, so the section can be defined as "#$ ...", "#$$ ..." etc. Second - how to define shortcut to toogle fold/unfold? Greetings, Sebastian
@edit: export function unfoldCurrentRow () { const editor = atom.workspace.getActiveTextEditor() const currentRow = editor.getCursorBufferPosition().row editor.unfoldBufferRow(currentRow) }
export function toggleCurrentRow () { const editor = atom.workspace.getActiveTextEditor() const currentRow = editor.getCursorBufferPosition().row if (editor.isFoldedAtBufferRow(currentRow)){ unfoldCurrentRow() } else { foldCurrentRow() } }