diff options
author | Canop <cano.petrole@gmail.com> | 2021-02-24 19:49:41 +0100 |
---|---|---|
committer | Canop <cano.petrole@gmail.com> | 2021-02-24 19:49:41 +0100 |
commit | 7d512894808500946a6acb6d4939d4ba1473c14d (patch) | |
tree | 78ce8071e4c3f85a2b22c621c5a75c03cca8d81a /website/docs | |
parent | ab3602693a5361187427a5ebab3e4705956c01e6 (diff) |
limit the number of panels to 2
Can be changed in conf with `max_panels_count`.
Fix #345
Diffstat (limited to 'website/docs')
-rw-r--r-- | website/docs/panels.md | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/website/docs/panels.md b/website/docs/panels.md index 30d976d..f3fb76d 100644 --- a/website/docs/panels.md +++ b/website/docs/panels.md @@ -1,28 +1,36 @@ +Broot can display two panels. Most frequent uses are: +* previewing files +* copying or moving files between two locations -# Open panels, switch between them +# Keyboard shortcuts -To focus a panel when several are displayed, you may click on the desired one, or use the `:panel_left` and `:panel_right` verbs which are, in standard, bound to <kbd>ctrl</kbd><kbd>←</kbd> and <kbd>ctrl</kbd><kbd>→</kbd>. +The <kbd>ctrl</kbd><kbd>←</kbd> and <kbd>ctrl</kbd><kbd>→</kbd> shortcuts should be enough to support all common panel related operation: -When there's no panel in that direction, a new one is created: +* When there's only one panel, use <kbd>ctrl</kbd><kbd>←</kbd> to open a panel to the left, and <kbd>ctrl</kbd><kbd>→</kbd> to open one to the right +* When two panels are open, you may go to the panel left of the current one with <kbd>ctrl</kbd><kbd>←</kbd> and to the panel to the right with <kbd>ctrl</kbd><kbd>→</kbd> +* When two panels are open, you may close the non selected one by going the opposite direction (i.e. if you're in the left panel, you may close the right one with <kbd>ctrl</kbd><kbd>←</kbd>) -* if the current selection is a regular file and you've hit <kbd>ctrl</kbd><kbd>→</kbd>, you get the preview panel -* in other cases you get a new tree whose root is the selected line. +The type of open panel depends on the selection: -This makes those shortcuts the easiest way to create a panel. +* If the current selection is a directory, the new panel will be a file tree +* If the current selection is a regular file, the new panel will be a preview -Another way is to add a bang (`!`) to a verb. It tells broot to show the result in a new panel. +You may also close the current panel with <kbd>ctrl</kbd><kbd>W</kbd>, which is a shortcut for `:close_panel` (you can [change all bindings](../conf_verbs/#keyboard-key)). -For example, while `:focus ~` navigates to your home directory in the current panel, you can use `:!focus ~` or `:focus! ~` to open a new panel on your home. +# Use a verb to open a panel + +Another way to open a panel is to add a bang (`!`) to a verb. It tells broot to show the result in a new panel. -The `:close_panel` closes the current panel and is bound to <kbd>ctrl</kbd><kbd>W</kbd> (remember: you can [change all bindings](../conf_verbs/#keyboard-key)). +For example, while `:focus ~` navigates to your home directory in the current panel, you can use `:!focus ~` or `:focus! ~` to open a new panel on your home. # The preview panel ![preview](img/20200716-preview.png) It's not immediately focused on creation, because most often you'll want to preview a few files and it's convenient to stay in the tree to navigate. -To focus it, for example to scroll it, do <kbd>ctrl</kbd><kbd>→</kbd> again. + +To focus it, for example to scroll it or to do a search, do <kbd>ctrl</kbd><kbd>→</kbd> again. Files that can't be interpreted as text or image are shown as binary: @@ -36,7 +44,6 @@ You can go from the selected matched line to the unfiltered text, at the right p Hopefully [this blog post](https://dystroy.org/blog/broot-c-search/) should make the complete search workflow look natural. - # Copy, move between panels... or more When exactly two panels are displayed, `{other-panel-file}` `{other-panel-directory}`, and `{other-panel-parent}` are available for verbs. @@ -80,9 +87,13 @@ You may now hit enter to execute the command, maybe after having completed the p This workflow is based on the `:start_end_panel` verb which can be bound to another key if desired. -# More about panels +# More panels + +The default configuration limits the number of panels to two, because most people never needs more and it makes it easier to alternate between one or two panels. + +But if you want more panels, for a specific configuration of for your main one, you may change the value of `max_panels_count` in the configuration file. -If your terminal is wide enough, you may open more panels: +If your terminal is wide enough, you may then open more panels: ![image](img/20200526-3-panels.png) |