WEB+DB PRESS Vol.58ã®æªåé²å
容ãã®4ã§ãã第4ç« ã®ãå±¥æ´ãã§ç´¹ä»ããããªãã£ãæ¡å¼µã2ã¤ããã¾ãã
1ã¤ã¯ k1LoW ããã® historyf.elãããã²ã¨ã¤ã¯ id:kitokitoki ([twitter:@mori_dev]) ããã®ãããã¡ã®åé¤ã¨å¾©å
ãæ°è»½ã«è¡ãã§ããã
ä»æ¥ã¯ãã®2ã¤ã®ç´¹ä»ã«å ãã¦ãMac ã® Emacs ã®ãã¼ãã¤ã³ããæ´ãã¦ããã©ã¦ã¶ã£ã½ãæåã«ãã¦ã¿ããã¨æãã¾ãã
ãªããç´¹ä»ããããªãã£ããã®2ã¤ã¯ WEB+DB PRESS Vol.58ï¼ãµãã¼ããã¼ã¸ã«ãããµã³ãã«ã³ã¼ãã®ä¸ã§å¯ãã«ç´¹ä»ãã¦ãã¾ããã¾ãããã以å¤ã«ããã¾ããããã¾ãã
Elscreen 㨠Anything ãå ãã¦ããã©ã¦ã¶ã®ã¿ãæä½ãEmacsã§å®ç¾ããã
æè¿ã®ãã©ã¦ã¶ã¯æ°è¦ã¿ããéãã¨ãOpera ã§ããã°ã¹ãã¼ããã¤ã¢ã«ãSafari ã Chrome ã®ããã¢ã¯ã»ã¹ãããã¼ã¸ãªã©ã移åãããããã¼ã¸ãéããã¾ãã
Elscreen 㯠Emacs ã«ã¿ãã£ã½ããã¼ã表示ãã¦ããã¾ããæ°è¦ã¹ã¯ãªã¼ã³ãä½æããã¨ãæ¨æºã§ã¯ *scratch* ãããã¡ã表示ããã¾ãããæ¯åã*scratch* ãéãã¦ãçµå±å¥ã®ãããã¡ãéããªããã ããªã®ã§ããã©ã¦ã¶ã®ããã«ããã¢ã¯ã»ã¹ãããããã¡ä¸è¦§ã表示ãããã¨ä¾¿å©ããããã¾ããã
ã¨ãããã¨ãè¸ã¾ãã¦ãMac ã® ⌘ ãã¼ã使ã£ããã©ã¦ã¶ã®æä½ãåèã« Elscreen ã®ãã¼ãã¤ã³ãã調ç¯ãã¦ã¿ã¾ãããã
(defun create-newscreen () "`elscreen-create' and `anything-for-files'" (interactive) (elscreen-create) (anything-for-files)) (define-key global-map (kbd "s-t") 'create-newscreen) (define-key global-map (kbd "s-w") 'elscreen-kill) (define-key global-map (kbd "s-M-<right>") 'elscreen-next) (define-key global-map (kbd "s-M-<left>") 'elscreen-previous)
create-newscreen ã¨ããåç´ã«æ°è¦ã¹ã¯ãªã¼ã³ãä½æããanything-for-files ãå®è¡ããã ãã®ã³ãã³ããä½æãã¾ããããã ⌘T ã«å²ãå½ã¦ãã¨ãã¾ãã§ãã©ã¦ã¶ã§æ°è¦ã¿ããéããã¨ãã®ããã«ãã¿ã(ã¹ã¯ãªã¼ã³)ãéãã¦ãã®ã¾ã¾å¥ã®ãããã¡ã¸ç§»åã§ãã¾ããã¨ãããããä½ãããªãå ´å㯠C-g ã§ãã£ã³ã»ã«ãã¾ãã
ãã¨ã¯ã⌘W ã§ã¹ã¯ãªã¼ã³ãéããã⌘⌥â 㨠⌘⌥â ã§ã¹ã¯ãªã¼ã³ã移åããã¨ãããã¼ãã¤ã³ããå ãã¾ããã
æä½ãã ãã¶ã¿ããã©ã¦ã¶ã£ã½ããªã£ã¦ãã¾ããã
ãã©ã¦ã¶ã®æ»ãã¨ãéããã¿ãã復å ããã Emacs ã§è¡ãªãã
ãã©ã¦ã¶ã§ããã¨ããã®ã⌘â 㨠⌘â ã«ããæ»ãããã¨ãOpera ã® ⌘Z ã«ããã¿ãã®å¾©å ã Emacs ã§è¡ãªã£ã¦ã¿ã¾ãããã
;;; historyf.elã§ãã©ã¦ã¶ã®ãæ»ãããã¿ã³çãªãããã¡ç§»åãå®ç¾ãã ;; http://emacs.g.hatena.ne.jp/k1LoW/20100410/1270886156 ;; (install-elisp "http://github.com/k1LoW/emacs-historyf/raw/master/historyf.el") (when (require 'historyf nil t) (define-key global-map (kbd "s-<right>") 'historyf-forward) (define-key global-map (kbd "s-<left>") 'historyf-back)) ;;; æè¿éãããããã¡ã復å ;; http://d.hatena.ne.jp/kitokitoki/20100608/p2 (defvar my-killed-file-name-list nil) (defun my-push-killed-file-name-list () (when (buffer-file-name) (push (expand-file-name (buffer-file-name)) my-killed-file-name-list))) (defun my-pop-killed-file-name-list () (interactive) (unless (null my-killed-file-name-list) (find-file (pop my-killed-file-name-list)))) (add-hook 'kill-buffer-hook 'my-push-killed-file-name-list) (define-key global-map (kbd "s-z") 'my-pop-killed-file-name-list)
ã¿ãã®å¾©å
ã«ã¤ãã¦ã¯ãã¹ã¯ãªã¼ã³ã復å
ããã®ã§ã¯ãªããæè¿éãããããã¡å±¥æ´ãé¡ã£ã¦å¾©å
ãã¦ããã¾ãã大å¤ä¾¿å©ã§ãã
Mac ã® Emacs 㯠OS ã¨ã®è¦ªåæ§ãé常ã«é«ãã⌘ ã«ãããã¼ãã¤ã³ã㯠Mac æ¨æºã®ã·ã§ã¼ãã«ãããControl 㯠Emacs ã®ãã¼ãã¤ã³ãã¨ããããåãåãã¦èãããã¨ãã§ããã®ã§ãç°å¢å¤åã«å¯¾ããè² è·ãå°ãªãã¨ã¦ãå¿«é©ã§ãã
Control ã«ãã Emacs ãã¼ãã¤ã³ãã¯ãä»ã®Macã¢ããªã§ã使ããã®ã§ãMac 㯠Emacs å
¥éOS ã¨ãã¦åªç§ã§ããã