Add compact mode, toggle with 'c'

This commit is contained in:
2024-10-02 02:14:36 +02:00
parent bf6756773e
commit be63775334
3 changed files with 28 additions and 10 deletions

View File

@ -216,6 +216,12 @@ class Editor
$this->redrawEditor();
break;
case "c":
Settings::$compactGroups = !Settings::$compactGroups;
$this->list->parseTree();
$this->redrawEditor();
break;
case "\x0e": // ctrl-n
$this->document->load((object)[]);
$this->list->parseTree();
@ -359,6 +365,8 @@ class Editor
e Edit selected value
E Edit selected key
D Delete selected key
c Toggle compact list view
q Toggle quoted keys in list view
^W Write to file
^R Read from file
^N New document with empty object