Skip to content

Commit

Permalink
feat(ad): adding some more command aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
sminez committed Sep 17, 2024
1 parent a50bc89 commit b446157
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/editor/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ impl Editor {
None
}

"q" | "quit" => Some(Single(Exit { force: false })),
"q!" | "quit!" => Some(Single(Exit { force: true })),
"q" | "quit" | "Exit" => Some(Single(Exit { force: false })),
"q!" | "quit!" | "Exit!" => Some(Single(Exit { force: true })),

"r" | "reload" => Some(Single(ReloadActiveBuffer)),
"r" | "reload" | "Get" => Some(Single(ReloadActiveBuffer)),
"R" | "reload-config" => Some(Single(ReloadConfig)),
"reload-buffer" => match args.parse::<usize>() {
Ok(id) => Some(Single(ReloadBuffer { id })),
Expand All @@ -94,7 +94,7 @@ impl Editor {

"vl" | "view-logs" => Some(Single(ViewLogs)),

"w" | "write" => {
"w" | "write" | "Put" => {
if args.is_empty() {
Some(Single(SaveBuffer { force: false }))
} else {
Expand All @@ -104,7 +104,7 @@ impl Editor {
}))
}
}
"w!" | "write!" => {
"w!" | "write!" | "Put!" => {
if args.is_empty() {
Some(Single(SaveBuffer { force: true }))
} else {
Expand Down

0 comments on commit b446157

Please sign in to comment.