about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--commands/account/delete.go (renamed from commands/account/delete-message.go)3
-rw-r--r--commands/account/next.go (renamed from commands/account/next-message.go)4
-rw-r--r--commands/account/select.go (renamed from commands/account/select-message.go)0
-rw-r--r--commands/account/view.go (renamed from commands/account/view-message.go)1
-rw-r--r--config/binds.conf28
5 files changed, 20 insertions, 16 deletions
diff --git a/commands/account/delete-message.go b/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
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
index bd44c1b..bd44c1b 100644
--- a/commands/account/select-message.go
+++ b/commands/account/select.go
diff --git a/commands/account/view-message.go b/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<Enter>
 
-j = :next-message<Enter>
-<Down> = :next-message<Enter>
-<C-d> = :next-message 50%<Enter>
-<C-f> = :next-message 100%<Enter>
-<PgDn> = :next-message -s 100%<Enter>
+j = :next<Enter>
+<Down> = :next<Enter>
+<C-d> = :next 50%<Enter>
+<C-f> = :next 100%<Enter>
+<PgDn> = :next -s 100%<Enter>
 
-k = :prev-message<Enter>
-<Up> = :prev-message<Enter>
-<C-u> = :prev-message 50%<Enter>
-<C-b> = :prev-message 100%<Enter>
-<PgUp> = :prev-message -s 100%<Enter>
-g = :select-message 0<Enter>
-G = :select-message -1<Enter>
+k = :prev<Enter>
+<Up> = :prev<Enter>
+<C-u> = :prev 50%<Enter>
+<C-b> = :prev 100%<Enter>
+<PgUp> = :prev -s 100%<Enter>
+g = :select 0<Enter>
+G = :select -1<Enter>
 
 J = :next-folder<Enter>
 K = :prev-folder<Enter>
 
-<Enter> = :view-message<Enter>
+<Enter> = :view<Enter>
 d = :confirm 'Really delete this message?' ':delete-message<Enter>'<Enter>
-D = :delete-message<Enter>
+D = :delete<Enter>
 
 rr = :reply<Enter>
 rq = :reply -q<Enter>