[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 220/255: list buffer navigation
From: |
Eric Schulte |
Subject: |
[elpa] 220/255: list buffer navigation |
Date: |
Sun, 16 Mar 2014 01:02:52 +0000 |
eschulte pushed a commit to branch go
in repository elpa.
commit dad4afef29698e7f6f1372552229fa881d8fdd90
Author: Eric Schulte <address@hidden>
Date: Thu Aug 8 09:20:21 2013 -0600
list buffer navigation
---
list-buffer.el | 32 +++++++++++++++++++++++++++-----
1 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/list-buffer.el b/list-buffer.el
index 7af6a0b..2657107 100644
--- a/list-buffer.el
+++ b/list-buffer.el
@@ -141,13 +141,35 @@ through the `*buffer-list*' variable.")
(interactive)
(error "not implemented."))
+(defun list-move-col (direction)
+ (cl-flet ((col () (or (get-text-property (point) :col) start-col)))
+ (let ((start-col (col)))
+ (while (= start-col (col))
+ (case direction
+ (:forward (forward-char))
+ (:backward (backward-char))))
+ (when (eql direction :backward)
+ (let ((end-col (col)))
+ (while (= end-col (col)) (backward-char))
+ (forward-char))))))
+
+(defun list-next-col () (interactive) (list-move-col :forward))
+(defun list-prev-col () (interactive) (list-move-col :backward))
+
(defvar list-mode-map
(let ((map (make-sparse-keymap)))
- (define-key map (kbd "<up>") 'list-up)
- (define-key map (kbd "<down>") 'list-down)
- (define-key map (kbd "f") 'list-filter)
- (define-key map (kbd "RET") 'list-enter)
- (define-key map (kbd "q") 'bury-buffer)
+ ;; navigation
+ (define-key map (kbd "j") 'next-line)
+ (define-key map (kbd "k") 'previous-line)
+ (define-key map (kbd "u") 'scroll-down-command)
+ (define-key map (kbd "<tab>") 'list-next-col)
+ (define-key map (kbd "<S-iso-lefttab>") 'list-prev-col)
+ ;; list functions
+ (define-key map (kbd "<up>") 'list-up)
+ (define-key map (kbd "<down>") 'list-down)
+ (define-key map (kbd "f") 'list-filter)
+ (define-key map (kbd "RET") 'list-enter)
+ (define-key map (kbd "q") 'bury-buffer)
map)
"Keymap for `list-mode'.")
- [elpa] 209/255: adding curry, rcurry and compose helpers, (continued)
- [elpa] 209/255: adding curry, rcurry and compose helpers, Eric Schulte, 2014/03/15
- [elpa] 213/255: include headers in width calculation, Eric Schulte, 2014/03/15
- [elpa] 215/255: smaller ldots, Eric Schulte, 2014/03/15
- [elpa] 200/255: refresh the go board, Eric Schulte, 2014/03/15
- [elpa] 214/255: refresh list every time the buffer changes size, Eric Schulte, 2014/03/15
- [elpa] 212/255: bug fix, wrong function name, Eric Schulte, 2014/03/15
- [elpa] 225/255: quit observing IGS game w/o closing connection, Eric Schulte, 2014/03/15
- [elpa] 171/255: bigger stones, Eric Schulte, 2014/03/15
- [elpa] 219/255: updated igs backend, Eric Schulte, 2014/03/15
- [elpa] 222/255: asynchronous IGS game listing, Eric Schulte, 2014/03/15
- [elpa] 220/255: list buffer navigation,
Eric Schulte <=
- [elpa] 217/255: sorting columns, Eric Schulte, 2014/03/15
- [elpa] 216/255: small list buffer tweaks, Eric Schulte, 2014/03/15
- [elpa] 238/255: wrap go-re-cond in save-match-data, Eric Schulte, 2014/03/15
- [elpa] 223/255: use igs-re-cond to handle prompts, Eric Schulte, 2014/03/15
- [elpa] 224/255: handle IGS shouts, Eric Schulte, 2014/03/15
- [elpa] 226/255: remove shouts from comments, Eric Schulte, 2014/03/15
- [elpa] 151/255: Revert "push all buffer-local variables into an igs object", Eric Schulte, 2014/03/15
- [elpa] 237/255: thoughts about browser-based implementation, Eric Schulte, 2014/03/15
- [elpa] 236/255: factor general comint utils out of igs.el, Eric Schulte, 2014/03/15
- [elpa] 192/255: two consecutive passes ends the game, Eric Schulte, 2014/03/15