doc: "Open a file from disk into the current view.",
doc: "Open a file from disk into the current view.",
fun: open,
fun: open,
completer: Some(completers::filename),
completer: Some(completers::filename),
},
},
TypableCommand{
TypableCommand{
name: "write",
name: "write",
alias: Some("w"),
aliases: &["w"],
doc: "Write changes to disk. Accepts an optional path (:write some/path.txt)",
doc: "Write changes to disk. Accepts an optional path (:write some/path.txt)",
fun: write,
fun: write,
completer: Some(completers::filename),
completer: Some(completers::filename),
},
},
TypableCommand{
TypableCommand{
name: "new",
name: "new",
alias: Some("n"),
aliases: &["n"],
doc: "Create a new scratch buffer.",
doc: "Create a new scratch buffer.",
fun: new_file,
fun: new_file,
completer: Some(completers::filename),
completer: Some(completers::filename),
},
},
TypableCommand{
TypableCommand{
name: "format",
name: "format",
alias: Some("fmt"),
aliases: &["fmt"],
doc: "Format the file using a formatter.",
doc: "Format the file using a formatter.",
fun: format,
fun: format,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "indent-style",
name: "indent-style",
alias: None,
aliases: &[],
doc: "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)",
doc: "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)",
fun: set_indent_style,
fun: set_indent_style,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "line-ending",
name: "line-ending",
alias: None,
aliases: &[],
doc: "Set the document's default line ending. Options: crlf, lf, cr, ff, nel.",
doc: "Set the document's default line ending. Options: crlf, lf, cr, ff, nel.",
fun: set_line_ending,
fun: set_line_ending,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "earlier",
name: "earlier",
alias: Some("ear"),
aliases: &["ear"],
doc: "Jump back to an earlier point in edit history. Accepts a number of steps or a time span.",
doc: "Jump back to an earlier point in edit history. Accepts a number of steps or a time span.",
fun: earlier,
fun: earlier,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "later",
name: "later",
alias: Some("lat"),
aliases: &["lat"],
doc: "Jump to a later point in edit history. Accepts a number of steps or a time span.",
doc: "Jump to a later point in edit history. Accepts a number of steps or a time span.",
fun: later,
fun: later,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "write-quit",
name: "write-quit",
alias: Some("wq"),
aliases: &["wq","x"],
doc: "Writes changes to disk and closes the current view. Accepts an optional path (:wq some/path.txt)",
doc: "Writes changes to disk and closes the current view. Accepts an optional path (:wq some/path.txt)",
fun: write_quit,
fun: write_quit,
completer: Some(completers::filename),
completer: Some(completers::filename),
},
},
TypableCommand{
TypableCommand{
name: "write-quit!",
name: "write-quit!",
alias: Some("wq!"),
aliases: &["wq!","x!"],
doc: "Writes changes to disk and closes the current view forcefully. Accepts an optional path (:wq! some/path.txt)",
doc: "Writes changes to disk and closes the current view forcefully. Accepts an optional path (:wq! some/path.txt)",
fun: force_write_quit,
fun: force_write_quit,
completer: Some(completers::filename),
completer: Some(completers::filename),
},
},
TypableCommand{
TypableCommand{
name: "write-all",
name: "write-all",
alias: Some("wa"),
aliases: &["wa"],
doc: "Writes changes from all views to disk.",
doc: "Writes changes from all views to disk.",
fun: write_all,
fun: write_all,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "write-quit-all",
name: "write-quit-all",
alias: Some("wqa"),
aliases: &["wqa","xa"],
doc: "Writes changes from all views to disk and close all views.",
doc: "Writes changes from all views to disk and close all views.",
fun: write_all_quit,
fun: write_all_quit,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "write-quit-all!",
name: "write-quit-all!",
alias: Some("wqa!"),
aliases: &["wqa!","xa!"],
doc: "Writes changes from all views to disk and close all views forcefully (ignoring unsaved changes).",
doc: "Writes changes from all views to disk and close all views forcefully (ignoring unsaved changes).",
fun: force_write_all_quit,
fun: force_write_all_quit,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "quit-all",
name: "quit-all",
alias: Some("qa"),
aliases: &["qa"],
doc: "Close all views.",
doc: "Close all views.",
fun: quit_all,
fun: quit_all,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "quit-all!",
name: "quit-all!",
alias: Some("qa!"),
aliases: &["qa!"],
doc: "Close all views forcefully (ignoring unsaved changes).",
doc: "Close all views forcefully (ignoring unsaved changes).",
fun: force_quit_all,
fun: force_quit_all,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "theme",
name: "theme",
alias: None,
aliases: &[],
doc: "Change the theme of current view. Requires theme name as argument (:theme <name>)",
doc: "Change the theme of current view. Requires theme name as argument (:theme <name>)",
fun: theme,
fun: theme,
completer: Some(completers::theme),
completer: Some(completers::theme),
},
},
TypableCommand{
TypableCommand{
name: "clipboard-yank",
name: "clipboard-yank",
alias: None,
aliases: &[],
doc: "Yank main selection into system clipboard.",
doc: "Yank main selection into system clipboard.",
fun: yank_main_selection_to_clipboard,
fun: yank_main_selection_to_clipboard,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "clipboard-yank-join",
name: "clipboard-yank-join",
alias: None,
aliases: &[],
doc: "Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline.",// FIXME: current UI can't display long doc.
doc: "Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline.",// FIXME: current UI can't display long doc.
fun: yank_joined_to_clipboard,
fun: yank_joined_to_clipboard,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "primary-clipboard-yank",
name: "primary-clipboard-yank",
alias: None,
aliases: &[],
doc: "Yank main selection into system primary clipboard.",
doc: "Yank main selection into system primary clipboard.",
fun: yank_main_selection_to_primary_clipboard,
fun: yank_main_selection_to_primary_clipboard,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "primary-clipboard-yank-join",
name: "primary-clipboard-yank-join",
alias: None,
aliases: &[],
doc: "Yank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline.",// FIXME: current UI can't display long doc.
doc: "Yank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline.",// FIXME: current UI can't display long doc.
fun: yank_joined_to_primary_clipboard,
fun: yank_joined_to_primary_clipboard,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "clipboard-paste-after",
name: "clipboard-paste-after",
alias: None,
aliases: &[],
doc: "Paste system clipboard after selections.",
doc: "Paste system clipboard after selections.",
fun: paste_clipboard_after,
fun: paste_clipboard_after,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "clipboard-paste-before",
name: "clipboard-paste-before",
alias: None,
aliases: &[],
doc: "Paste system clipboard before selections.",
doc: "Paste system clipboard before selections.",
fun: paste_clipboard_before,
fun: paste_clipboard_before,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "clipboard-paste-replace",
name: "clipboard-paste-replace",
alias: None,
aliases: &[],
doc: "Replace selections with content of system clipboard.",
doc: "Replace selections with content of system clipboard.",
fun: replace_selections_with_clipboard,
fun: replace_selections_with_clipboard,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "primary-clipboard-paste-after",
name: "primary-clipboard-paste-after",
alias: None,
aliases: &[],
doc: "Paste primary clipboard after selections.",
doc: "Paste primary clipboard after selections.",
fun: paste_primary_clipboard_after,
fun: paste_primary_clipboard_after,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "primary-clipboard-paste-before",
name: "primary-clipboard-paste-before",
alias: None,
aliases: &[],
doc: "Paste primary clipboard before selections.",
doc: "Paste primary clipboard before selections.",
fun: paste_primary_clipboard_before,
fun: paste_primary_clipboard_before,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "primary-clipboard-paste-replace",
name: "primary-clipboard-paste-replace",
alias: None,
aliases: &[],
doc: "Replace selections with content of system primary clipboard.",
doc: "Replace selections with content of system primary clipboard.",
fun: replace_selections_with_primary_clipboard,
fun: replace_selections_with_primary_clipboard,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "show-clipboard-provider",
name: "show-clipboard-provider",
alias: None,
aliases: &[],
doc: "Show clipboard provider name in status bar.",
doc: "Show clipboard provider name in status bar.",
fun: show_clipboard_provider,
fun: show_clipboard_provider,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "change-current-directory",
name: "change-current-directory",
alias: Some("cd"),
aliases: &["cd"],
doc: "Change the current working directory (:cd <dir>).",
doc: "Change the current working directory (:cd <dir>).",
fun: change_current_directory,
fun: change_current_directory,
completer: Some(completers::directory),
completer: Some(completers::directory),
},
},
TypableCommand{
TypableCommand{
name: "show-directory",
name: "show-directory",
alias: Some("pwd"),
aliases: &["pwd"],
doc: "Show the current working directory.",
doc: "Show the current working directory.",
fun: show_current_directory,
fun: show_current_directory,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "encoding",
name: "encoding",
alias: None,
aliases: &[],
doc: "Set encoding based on `https://encoding.spec.whatwg.org`",
doc: "Set encoding based on `https://encoding.spec.whatwg.org`",
fun: set_encoding,
fun: set_encoding,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "reload",
name: "reload",
alias: None,
aliases: &[],
doc: "Discard changes and reload from the source file.",
doc: "Discard changes and reload from the source file.",
fun: reload,
fun: reload,
completer: None,
completer: None,
},
},
TypableCommand{
TypableCommand{
name: "tree-sitter-scopes",
name: "tree-sitter-scopes",
alias: None,
aliases: &[],
doc: "Display tree sitter scopes, primarily for theming and development.",
doc: "Display tree sitter scopes, primarily for theming and development.",