Skip to content

Instantly share code, notes, and snippets.

@whym
Created May 12, 2009 01:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whym/110268 to your computer and use it in GitHub Desktop.
Save whym/110268 to your computer and use it in GitHub Desktop.
;; Navigational shortcut keys for twit.el
;; Type "n" to go to the next post.
;; Type "p" to go to the previous post.
;;
;; You might want to change the key assignment below,
;; because it overwrites the default settings of twit.el
(setq twit-key-list
'((" ". scroll-up)
([backspace]. scroll-down)
("j". (lambda () (interactive) (next-line) (recenter 0)))
("k". (lambda () (interactive) (previous-line) (recenter 0)))
("n".
(lambda () (interactive)
(beginning-of-line)
(let ((cur-meta (search-forward-regexp "^ *posted")))
(progn (goto-char cur-meta)
(next-line)
(beginning-of-line)
(recenter 0)))))
("p".
(lambda () (interactive)
(beginning-of-line)
(let ((prev-meta (search-backward-regexp "^ *posted" (point-min) 't)))
(if (not prev-meta)
nil
(progn (goto-char prev-meta)
(beginning-of-line)
(let ((prevprev-meta (search-backward-regexp "^ *posted")))
(progn (goto-char prevprev-meta)
(next-line)
(beginning-of-line)
(recenter 0))))))))
("f". twit-list-followers)
("d". twit-direct)
("*". twit-add-favorite)
("a". twit-add-friend)
("?". twit-mode-help)
("s". twit-show-recent-tweets)
("S". twit-search)
("@". twit-show-at-tweets)
("t". twit-post)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment