Skip to content

Instantly share code, notes, and snippets.

@yosshi
Created November 5, 2009 15:05
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 yosshi/227097 to your computer and use it in GitHub Desktop.
Save yosshi/227097 to your computer and use it in GitHub Desktop.
;;バッファ切り替え(C-x b)
(iswitchb-mode t)
(iswitchb-default-keybindings)
(add-hook 'iswitchb-define-mode-map-hook
'iswitchb-my-keys)
(defun iswitchb-my-keys ()
"Add my keybindings for iswitchb."
(define-key iswitchb-mode-map [right] 'iswitchb-next-match)
(define-key iswitchb-mode-map [left] 'iswitchb-prev-match)
(define-key iswitchb-mode-map "\C-f" 'iswitchb-next-match)
(define-key iswitchb-mode-map " " 'iswitchb-next-match)
(define-key iswitchb-mode-map "\t" 'iswitchb-next-match)
(define-key iswitchb-mode-map "\C-b" 'iswitchb-prev-match)
)
(defadvice iswitchb-exhibit
(after
iswitchb-exhibit-with-display-buffer
activate)
"選択している buffer を window に表示してみる。"
(when (and
(eq iswitchb-method iswitchb-default-method)
iswitchb-matches)
(select-window
(get-buffer-window (cadr (buffer-list))))
(let ((iswitchb-method 'samewindow))
(iswitchb-visit-buffer
(get-buffer (car iswitchb-matches))))
(select-window (minibuffer-window))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment