diff --git a/commands/account/delete-message.go b/commands/account/delete.go similarity index 91% rename from commands/account/delete-message.go rename to commands/account/delete.go index d6b669e..65d6eb9 100644 --- a/commands/account/delete-message.go +++ b/commands/account/delete.go @@ -11,12 +11,13 @@ import ( ) func init() { + register("delete", DeleteMessage) register("delete-message", DeleteMessage) } func DeleteMessage(aerc *widgets.Aerc, args []string) error { if len(args) != 1 { - return errors.New("Usage: :delete-message") + return errors.New("Usage: :delete") } acct := aerc.SelectedAccount() if acct == nil { diff --git a/commands/account/next-message.go b/commands/account/next.go similarity index 88% rename from commands/account/next-message.go rename to commands/account/next.go index f13ea5a..7e8541f 100644 --- a/commands/account/next-message.go +++ b/commands/account/next.go @@ -10,7 +10,9 @@ import ( ) func init() { + register("next", NextPrevMessage) register("next-message", NextPrevMessage) + register("prev", NextPrevMessage) register("prev-message", NextPrevMessage) } @@ -45,7 +47,7 @@ func NextPrevMessage(aerc *widgets.Aerc, args []string) error { n = int(float64(acct.Messages().Height()) * (float64(n) / 100.0)) } for ; n > 0; n-- { - if args[0] == "prev-message" { + if args[0] == "prev-message" || args[0] == "prev" { acct.Messages().Prev() } else { acct.Messages().Next() diff --git a/commands/account/select-message.go b/commands/account/select.go similarity index 100% rename from commands/account/select-message.go rename to commands/account/select.go diff --git a/commands/account/view-message.go b/commands/account/view.go similarity index 94% rename from commands/account/view-message.go rename to commands/account/view.go index 4db5c95..40abec3 100644 --- a/commands/account/view-message.go +++ b/commands/account/view.go @@ -7,6 +7,7 @@ import ( ) func init() { + register("view", ViewMessage) register("view-message", ViewMessage) } diff --git a/config/binds.conf b/config/binds.conf index 4d184fb..058b2d0 100644 --- a/config/binds.conf +++ b/config/binds.conf @@ -8,26 +8,26 @@ [messages] q = :quit -j = :next-message - = :next-message - = :next-message 50% - = :next-message 100% - = :next-message -s 100% +j = :next + = :next + = :next 50% + = :next 100% + = :next -s 100% -k = :prev-message - = :prev-message - = :prev-message 50% - = :prev-message 100% - = :prev-message -s 100% -g = :select-message 0 -G = :select-message -1 +k = :prev + = :prev + = :prev 50% + = :prev 100% + = :prev -s 100% +g = :select 0 +G = :select -1 J = :next-folder K = :prev-folder - = :view-message + = :view d = :confirm 'Really delete this message?' ':delete-message' -D = :delete-message +D = :delete rr = :reply rq = :reply -q