Skip to content

Commit 8c81426

Browse files
committed
[guide] Add guide to menu
1 parent 74453c5 commit 8c81426

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

visidata/features/menu_guide.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from visidata import GuideSheet, vd
2+
3+
class MenuGuide(GuideSheet):
4+
guide = '''# The VisiData Menu System
5+
6+
VisiData's menu is at the [:black on 68]top of the screen[/].
7+
8+
It can be navigated both as a standard, clickable GUI menu, and via keystrokes.
9+
10+
To navigate via keystrokes, `Alt+H` will open the **Help** menu, and from there `arrow` keys can be used to move between submenus.
11+
12+
Additionally, each top-level menu name has a single letter underlined. `Alt+<underlined letter>` will open that menu. For example, `Alt+F` will open the **File** menu.
13+
14+
» indicates a submenu, which can be traversed with the `right arrow` or a mouse-click. The leaf node of every menu tree is a command.
15+
16+
When the cursor is on a command, the menu throws up its helpbox. This contains the description of the command, the keyboard shortcut if available, and its command longname. Clicking on the command in the menu, or pressing `Enter`, will execute the actual command.
17+
18+
`⎘` indicates that the command will push a sheet onto sheet stack. `…` indicates that input will be required for the command.
19+
20+
Sheet-specific commands will only appear in the menu when that specific sheet type is loaded. The entire menu-tree for sheet-specific commands will appear in the menu [:black on 34 green]highlighted green[/].
21+
22+
## Options (must reload to take effect)
23+
24+
- [:onclick options-sheet disp_menu_fmt]`disp_menu_fmt`[/] to set the right side menu format string
25+
- [:onclick options-sheet disp_menu]`disp_menu`[/] to toggle the presence of the menu on top line, when it is not active
26+
'''
27+
28+
vd.addGuide('MenuGuide', MenuGuide)

0 commit comments

Comments
 (0)