egg.elãè¨å®ãã¦ã¿ã
gitã®Emacsã¤ã³ã¿ã¼ãã§ã¼ã¹ã¯egg.elãããã
ã¨ããããããã©ã³ããè¦ã¥ããã®ã§M-x list-faces-displayã§egg-*ããvariable-pitchã¨ãªã£ã¦ãããã§ã¤ã¹ããªãã¨ããããè²ããããªãã®ã§ã¦ãã¨ã¼ã«è¨å®ã
ãã¦ã以ågit stashã便å©ã ã¨æãã¦ããã£ãã®ã§egg.elã§ä½¿ããã確èªãegg-stashã³ãã³ããããããegg.elã§ä½¿ããããã ãããããdescribe-bindingsã§èª¿ã¹ã¦ã¿ã¦ããã¼ã«ã¯å²ãå½ã¦ããã¦ããªããèªåã§è¨å®ããªãã¨ãããªãããã ãegg-stashã¯stashã®ä¸è¦§è¡¨ã£ã½ããã¨ããããä¸çªãã使ãã®ãä»ãã£ã¦ããä½æ¥ãç½®ãã¨ãã¦ãã£ã¦æããªã®ã§ä¸è¦§ã¾ã§ã¯ã¡ãã£ã¨å¤§è¢è£ãããããªãã
ããã¡ãã£ã¨èª¿ã¹ã¦ã¿ãã¨ãegg-buffer-stash-wipã¨ããã³ãã³ããä»ã®ãã¡ã¤ã«ã«å¯¾ãã¦stashãå®è¡ããã£ã½ããã¨ãããã£ããã§ãstashããæ»ãã«ã¯egg-stash-buffer-popã®ããã ãããããã³ãã³ããè¦ã¤ããã®ã¯ãanything.el + anything-match-plugin.elã«ããçµãè¾¼ã¿æ¤ç´¢ã«ãããã®ãæ¬å½ã«å©ããã
egg.elã§æ°ãããã¦ããªã¼ã£ã¦æãã®ã¯ãæ £ã親ããã Emacs VCã®ãã¼ãã¤ã³ãã使ããã¨ãããã¨ãä½æ°ã«C-x v vãæ¼ãã¨æ¬¡ããã¹ããã¨ãæãã¦ããããããã«ã¯æåããã*1ããã«stashé¢é£ã®ã³ãã³ããå²ãå½ã¦ã¦ã¿ããã ãã©ãã¡ãã¡eggã®ãããã¡ããããã¢ããããã®ããããâ¦
(define-key egg-file-cmd-map "z" 'egg-buffer-stash-wip) ; C-x v z (define-key egg-file-cmd-map "Z" 'egg-stash-buffer-pop) ; C-x v Z
egg.elã¯ãããªãã«ä½¿ããããã¨ã¯æããã©ããããããã³ãã³ãã®æ°ãå¤ãããå°è±¡ãããããã¨ãã°ããã°ã®ãããã¡ã§SPCãæ¼ãã°diffãããã°ã®è©³ç´°ãåºã¦ããã®ã ããéããã®ã¯hãæ¼ããªãã¨ãããªããã§ãåã³è©³ç´°ãéãã®ã«SPCã§ã¯ãªãã¦hã ãããèããã¨SPCãããã¡ãã£ã¨ç©ºæ°èªãã§ãããã¨ããã®ã ãã
ãã¨ãC-x v lã¯VCçã«ã¯ããã®ãã¡ã¤ã«ã®ããã°ãé²è¦§ãããã®ã ã¨æãããããã¸ã§ã¯ãå
ã®å
¨ãã¡ã¤ã«ã®ãã°ãåºã¦ããããå°ããã ãããã®ãã¡ã¤ã«ã®ãã°ã ããè¦ããã£ã¤ã¼ã®ã
(defun git-log-file () (interactive) (shell-command (format "git log %s" buffer-file-name) "*git-log*")) (define-key egg-file-cmd-map "l" 'git-log-file)
VCã ã¨C-x v lâdã§ãã°ããdiffãè¦ãããããeggã ã¨dãããªãã¦ã=ãã«ãªã£ã¦ãããµã¤ã¼dã ãã
(define-key egg-diff-section-map "d" 'egg-diff-section-cmd-ediff) (define-key egg-staged-diff-section-map "d" 'egg-staged-section-cmd-ediff3) (define-key egg-unstaged-diff-section-map "d" 'egg-unstaged-section-cmd-ediff) (define-key egg-unmerged-diff-section-map "d" 'egg-unmerged-section-cmd-ediff3) (define-key egg-hunk-section-map "d" 'egg-diff-section-cmd-ediff) (define-key egg-staged-hunk-section-map "d" 'egg-staged-section-cmd-ediff3) (define-key egg-unstaged-hunk-section-map "d" 'egg-unstaged-section-cmd-ediff) (define-key egg-unmerged-hunk-section-map "d" 'egg-unmerged-section-cmd-ediff3) (define-key egg-log-commit-map "d" 'egg-log-buffer-diff-revs) (define-key egg-log-diff-map "d" 'egg-diff-section-cmd-ediff) (define-key egg-log-hunk-map "d" 'egg-diff-section-cmd-ediff)
*1:æ°ãããã®ã«ãªããªããªããããé·å¹´ä½¿ã£ã¦ãããã®ãæ¨ã¦ãããªãã¨æããããã¯èªåãã ãã ãå¹´å¯ãåãã¦ãããã¨ãæãããè¥ãé ã¨éã£ã¦å¦ç¿ã³ã¹ãã¯ããªãå¢ãã¦ããã