English | 日本語
Press Ctrl-T (or Tools → Command Palette…) to search every action the file list understands and run the one you pick.
┌ Command Palette ───────────────────────────────────────┐
│ 🔍 [copy ] │
│ │
│ copy_names Ctrl-N │
│ copy_paths Ctrl-P │
│ copy_files C │
│ copy_files_to Shift-C │
│ copy_log_all │
│ │
│ Copy the file name(s) to the clipboard │
├────────────────────────────────────────────────────────┤
│ ↑/↓ select · Enter choose · F1 help · Esc cancel │
└────────────────────────────────────────────────────────┘
duplicate_files, focus_left or copy_log_all.quit, help, isearch, edit_file).ACTIONS in config.py.Actions that only mean something inside a viewer (scrolling the text viewer, zooming an image) are not listed; open that viewer and press F1 for its keys.
sel all finds select_all and toggle_select_items.
Romaji finds Japanese names through Migemo, as in every other picker.Each row shows the key the action is bound to on the right, so the palette is also the quickest way to find out which key does something. The line under the list describes the highlighted action.
An action that needs a selection still runs from the palette and works on the item under the cursor, or says why it cannot — the same as choosing it from a menu.
| Menu bar | the main operations, grouped, to browse |
| F1 help | every key on the current screen, to read and learn |
| Command palette | any action, found by a fragment of its name, and run |
KEY_BINDINGS = {
'command_palette': ['Ctrl-T'], # open the palette (file list)
'describe_list_item': ['F1'], # help for the highlighted row (inside the palette)
}
describe_list_item belongs to the searchable-list pickers, so like
remove_list_item it must be a modified or non-printable key — the query field
takes every character you type.
Write a docstring. Its first line is shown under the list, and the paragraphs after the blank line are the page F1 opens:
def open_in_vscode(ctx):
"""Open the focused item in VS Code.
Works on directories too — VS Code opens them as a workspace.
"""
ctx.run_program(['code', str(ctx.pane.focused.path)])
class Config:
ACTIONS = {
'open_in_vscode': open_in_vscode,
}
See Customization for writing actions.