mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-13 23:36:09 +03:00
Docs: improve doc structure for action bindings with args and examples
minor doc changes
This commit is contained in:
@ -280,8 +280,15 @@ pub const Action = union(enum) {
|
|||||||
scroll_page_fractional: f32,
|
scroll_page_fractional: f32,
|
||||||
scroll_page_lines: i16,
|
scroll_page_lines: i16,
|
||||||
|
|
||||||
/// Adjust an existing selection in a given direction. This action
|
/// Adjust the current selection in a given direction. Does nothing if no
|
||||||
/// does nothing if there is no active selection.
|
/// selection exists.
|
||||||
|
///
|
||||||
|
/// Arguments:
|
||||||
|
/// - AdjustSelection: left, right, up, down, page_up, page_down, home, end,
|
||||||
|
/// beginning_of_line, end_of_line
|
||||||
|
///
|
||||||
|
/// Example: Extend selection to the right
|
||||||
|
/// keybind = shift+right=adjust_selection:right
|
||||||
adjust_selection: AdjustSelection,
|
adjust_selection: AdjustSelection,
|
||||||
|
|
||||||
/// Jump the viewport forward or back by prompt. Positive number is the
|
/// Jump the viewport forward or back by prompt. Positive number is the
|
||||||
@ -337,25 +344,47 @@ pub const Action = union(enum) {
|
|||||||
/// This only works with libadwaita enabled currently.
|
/// This only works with libadwaita enabled currently.
|
||||||
toggle_tab_overview: void,
|
toggle_tab_overview: void,
|
||||||
|
|
||||||
/// Create a new split in the given direction. The new split will appear in
|
/// Create a new split in the given direction.
|
||||||
/// the direction given. For example `new_split:up`. Valid values are left, right, up, down and auto.
|
///
|
||||||
|
/// Arguments:
|
||||||
|
/// - SplitDirection: right, down, left, up, auto (along the larger dir)
|
||||||
|
///
|
||||||
|
/// Example: Create split on the right
|
||||||
|
/// keybind = cmd+shift+d=new_split:right
|
||||||
new_split: SplitDirection,
|
new_split: SplitDirection,
|
||||||
|
|
||||||
/// Focus on a split in a given direction. For example `goto_split:up`. Valid values are left, right, up, down, previous and next.
|
/// Focus a split in a given direction.
|
||||||
|
///
|
||||||
|
/// Arguments:
|
||||||
|
/// - SplitFocusDirection: previous, next, up, left, down, right
|
||||||
|
///
|
||||||
|
/// Example: Focus split on the right
|
||||||
|
/// keybind = cmd+right=goto_split:right
|
||||||
goto_split: SplitFocusDirection,
|
goto_split: SplitFocusDirection,
|
||||||
|
|
||||||
/// zoom/unzoom the current split.
|
/// zoom/unzoom the current split.
|
||||||
toggle_split_zoom: void,
|
toggle_split_zoom: void,
|
||||||
|
|
||||||
/// Resize the current split by moving the split divider in the given
|
/// Resize the current split in a given direction.
|
||||||
/// direction. For example `resize_split:left,10`. The valid directions are up, down, left and right.
|
///
|
||||||
|
/// Arguments:
|
||||||
|
/// - SplitResizeDirection: up, down, left, right
|
||||||
|
/// - The number of pixels to resize the split by
|
||||||
|
///
|
||||||
|
/// Example: Move divider up 10 pixels
|
||||||
|
/// keybind = cmd+shift+up=resize_split:up,10
|
||||||
resize_split: SplitResizeParameter,
|
resize_split: SplitResizeParameter,
|
||||||
|
|
||||||
/// Equalize all splits in the current window
|
/// Equalize all splits in the current window
|
||||||
equalize_splits: void,
|
equalize_splits: void,
|
||||||
|
|
||||||
/// Show, hide, or toggle the terminal inspector for the currently focused
|
/// Control the terminal inspector visibility.
|
||||||
/// terminal.
|
///
|
||||||
|
/// Arguments:
|
||||||
|
/// - InspectorMode: toggle, show, hide
|
||||||
|
///
|
||||||
|
/// Example: Toggle inspector visibility
|
||||||
|
/// keybind = cmd+i=inspector:toggle
|
||||||
inspector: InspectorMode,
|
inspector: InspectorMode,
|
||||||
|
|
||||||
/// Open the configuration file in the default OS editor. If your default OS
|
/// Open the configuration file in the default OS editor. If your default OS
|
||||||
@ -504,7 +533,6 @@ pub const Action = union(enum) {
|
|||||||
pub const SplitFocusDirection = enum {
|
pub const SplitFocusDirection = enum {
|
||||||
previous,
|
previous,
|
||||||
next,
|
next,
|
||||||
|
|
||||||
up,
|
up,
|
||||||
left,
|
left,
|
||||||
down,
|
down,
|
||||||
|
Reference in New Issue
Block a user