aboutsummaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJohnson Denen <johnson.denen@gmail.com>2018-11-19 17:07:52 -0500
committerJohnson Denen <johnson.denen@gmail.com>2019-03-04 22:44:28 -0500
commit44175357db20d14abe4fb92e1c0ff83f9f745d32 (patch)
treeff88f4c0b5afc7ba7adbd246e9e644d29b685a54 /lisp
parent90c5a4da5263411e4012022b9fe362697935c2a6 (diff)
Close #199 with keybinding refactor
Diffstat (limited to 'lisp')
-rw-r--r--lisp/mastodon.el34
1 files changed, 18 insertions, 16 deletions
diff --git a/lisp/mastodon.el b/lisp/mastodon.el
index 950db19..a707a47 100644
--- a/lisp/mastodon.el
+++ b/lisp/mastodon.el
@@ -75,35 +75,37 @@ Use. e.g. \"%c\" for your locale's date and time format."
(defvar mastodon-mode-map
(let ((map (make-sparse-keymap)))
- ;; Navigation
- (define-key map (kbd "j") #'mastodon-tl--goto-next-toot)
- (define-key map (kbd "k") #'mastodon-tl--goto-prev-toot)
- (define-key map (kbd "h") #'mastodon-tl--next-tab-item)
- (define-key map (kbd "l") #'mastodon-tl--previous-tab-item)
+ ;; navigation inside a timeline
+ (define-key map (kbd "n") #'mastodon-tl--goto-next-toot)
+ (define-key map (kbd "p") #'mastodon-tl--goto-prev-toot)
+ (define-key map (kbd "M-n") #'mastodon-tl--next-tab-item)
+ (define-key map (kbd "M-p") #'mastodon-tl--previous-tab-item)
(define-key map [?\t] #'mastodon-tl--next-tab-item)
(define-key map [backtab] #'mastodon-tl--previous-tab-item)
(define-key map [?\S-\t] #'mastodon-tl--previous-tab-item)
(define-key map [?\M-\t] #'mastodon-tl--previous-tab-item)
- ;; Navigating to other buffers:
- (define-key map (kbd "N") #'mastodon-notifications--get)
+ ;; navigation between timelines
+ (define-key map (kbd "#") #'mastodon-tl--get-tag-timeline)
(define-key map (kbd "A") #'mastodon-profile--get-toot-author)
- (define-key map (kbd "U") #'mastodon-profile--show-user)
(define-key map (kbd "F") #'mastodon-tl--get-federated-timeline)
(define-key map (kbd "H") #'mastodon-tl--get-home-timeline)
(define-key map (kbd "L") #'mastodon-tl--get-local-timeline)
- (define-key map (kbd "t") #'mastodon-tl--thread)
- (define-key map (kbd "T") #'mastodon-tl--get-tag-timeline)
+ (define-key map (kbd "N") #'mastodon-notifications--get)
+ (define-key map (kbd "P") #'mastodon-profile--show-user)
+ (define-key map (kbd "T") #'mastodon-tl--thread)
+ ;; navigation out of mastodon
(define-key map (kbd "q") #'kill-this-buffer)
(define-key map (kbd "Q") #'kill-buffer-and-window)
- ;; Actions
+ ;; timeline actions
+ (define-key map (kbd "b") #'mastodon-toot--toggle-boost)
(define-key map (kbd "c") #'mastodon-tl--toggle-spoiler-text-in-toot)
- (define-key map (kbd "g") #'undefined) ;; override special mode binding
- (define-key map (kbd "n") #'mastodon-toot)
+ (define-key map (kbd "f") #'mastodon-toot--toggle-favourite)
(define-key map (kbd "r") #'mastodon-toot--reply)
(define-key map (kbd "u") #'mastodon-tl--update)
- (define-key map (kbd "b") #'mastodon-toot--toggle-boost)
- (define-key map (kbd "f") #'mastodon-toot--toggle-favourite)
- ;; Finally, return the map:
+ ;; new toot
+ (define-key map (kbd "t") #'mastodon-toot)
+ ;; override special mode binding
+ (define-key map (kbd "g") #'undefined)
map)
"Keymap for `mastodon-mode'.")