Skip to content

Instantly share code, notes, and snippets.

@fujimisakari
Last active August 29, 2015 14:14
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 fujimisakari/8b6cc63c6d62d195aaf7 to your computer and use it in GitHub Desktop.
Save fujimisakari/8b6cc63c6d62d195aaf7 to your computer and use it in GitHub Desktop.
elscreenの各タブに任意のバッファを一括設定する ref: http://qiita.com/fujimisakari/items/94d8566fafb9ba7693bd
;; screenを定位置に設定する
(setq elscreen-custom-screen-alist
'((0 . "Folder")
(1 . "*twittering*")
(2 . "todo.org")
(3 . "*scratch*")
(4 . "*scratch*")
(5 . "*scratch*")
(6 . "*scratch*")
(7 . "*scratch*")
(8 . "*scratch*")
(9 . "*scratch*")))
(defun elscreen-set-custom-screen ()
(interactive)
(let ((screen-list (sort (elscreen-get-screen-list) '<))
(current-screen (elscreen-get-current-screen)))
(mapc (lambda (alist)
(let ((screen-num (car alist))
(buffer-name (cdr alist)))
(elscreen-goto (nth screen-num screen-list))
(switch-to-buffer buffer-name))) elscreen-custom-screen-alist)
(elscreen-goto current-screen)))
(global-set-key (kbd "<f8>") 'elscreen-set-custom-screen)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment