Skip to content

Commit

Permalink
better default edit verb and guidelines
Browse files Browse the repository at this point in the history
Fix #745
  • Loading branch information
Canop committed Sep 20, 2023
1 parent 492c5c7 commit a201d80
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 9 additions & 7 deletions resources/default-conf/verbs.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,24 @@ verbs: [
# can customize.
# If $EDITOR isn't set on your computer, you should either set it using
# something similar to
# export EDITOR=/usr/local/bin/nvim
# export EDITOR=/usr/local/bin/nvim
# or just replace it with your editor of choice in the 'execution'
# pattern.
# If your editor is able to open a file on a specific line, use {line}
# so that you may jump directly at the right line from a preview.
# Example:
# execution: nvim +{line} {file}
# If your editor is able to open a file on a specific line, use {line}
# so that you may jump directly at the right line from a preview or
# a content search.
# Examples depending on your favourite editor:
# execution: "nvim +{line} {file}"
# execution: "helix {file}:{line}"
{
invocation: edit
shortcut: e
execution: "$EDITOR +{line} {file}"
execution: "$EDITOR {file}"
leave_broot: false
}

# A convenient shortcut to create new text files in
# the current directory or below
# the current directory or below
{
invocation: create {subpath}
execution: "$EDITOR {directory}/{subpath}"
Expand Down
3 changes: 2 additions & 1 deletion src/conf/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ impl Conf {
&conf_dir,
Attribute::Reset,
);
println!("You should have a look at them.");
println!("You should have a look at them: their comments will help you configure broot.");
println!("You should especially set up your favourite editor in verbs.hjson.");
}
let mut conf = Conf::default();
conf.read_file(conf_filepath)?;
Expand Down

0 comments on commit a201d80

Please sign in to comment.