e2wm ã® magit ãã¼ã¹ãã¯ãã£ã
Emacs ã®ã¦ã¤ã³ãã¦ç®¡çãã¼ã« e2wm ã® magit ãã¼ã¹ãã¯ãã£ããä½ã£ã¦ã¿ãã®ã§ç°¡åã«ç´¹ä»ãã¾ãã
- 以åã®è¨äºï¼ 広くなった画面を有効利用できる、Emacs内Window管理ツール e2wm.el を作ってみた。
magit ã¯ã Emacs ã® git ã¤ã³ã¿ãã§ã¼ã¹ã§ãã
å°å ¥æ¹æ³ã¯å¾ãã®æ¹ã«ããã¾ãã
ç»é¢ã¨æ¦è¦
ã³ã¼ãç·¨éç¨ã®ç»é¢ããããã£ã¨ magit ç¨ã®ãã¼ã¹ãã¯ãã£ãã«åãæ¿ãã¾ãã
M-x e2wm:dp-magit ã¨ããã®ã¯å¤§å¤ãªã®ã§ãæ®éã¯é©å½ãªãã¼ãã¤ã³ãã«å²ãå½ã¦ã¾ããèªåã®æã§ã¯ M-w ã«å²ãå½ã¦ã¦ãã¾ãã
magit ãã¼ã¹ãã¯ãã£ãã®ç»é¢ã¯ä»¥ä¸ã®ããã§ãã
åã¦ã¤ã³ãã¦ã®å½¹å²
ä¸å¤®ã«ç¾å¨ç·¨éä¸ã®ããã¸ã§ã¯ãã® magit-status ãããã¡ã表示ããå³å´ã«ãã©ã³ãä¸è¦§ã¨å±¥æ´ã表示ãã¾ããå³å´ã®ãã©ã³ãä¸è¦§ã¨å±¥æ´ã¯åèç¨åº¦ã§ãã®ã§ãåºæ¬çã«ã¯çãä¸ã® magit-status ãããã¡ã§ä½æ¥ããã¾ããã¨ãããã¨ã§ã magit ãæ¢ã«ä½¿ã£ã¦ãã人ãªãç¹ã«è¦ãããã¨ã¯ããã¾ããã
magit ã«ã¤ãã¦ã¯ä»¥ä¸ã®æ¬å®¶ããã¥ã¢ã«ã詳ããã§ããä¸éãèªãã¨å¤§ä½ä½¿ããã¨æãã¾ãã
ãã©ã³ããå±¥æ´ã®ãã©ã¦ãº
ãã©ã³ãä¸è¦§ã¯ã magit-show-branches ã³ãã³ããå®è¡ãããããã¡ã«ãªã£ã¦ãã¾ãã®ã§ããã©ã³ãã®åãæ¿ãï¼git checkout ã¨ãï¼ãåºæ¥ã¾ãã
ã¾ããå±¥æ´ä¸è¦§ã¯ã magit-display-log ã³ãã³ããå®è¡ãããããã¡ã«ãªã£ã¦ãã¾ãããã®ãããã¡ãã n ã p ãªã©ã®ãã¼ãã¤ã³ãã§ãã³ãããå±¥æ´ã次ã ã¨è¦ã¦ãããã¨ãåºæ¥ã¾ããã³ãããã®è©³ç´°ã¯çãä¸ã®ã¡ã¤ã³ã®ã¦ã¤ã³ãã¦ã«è¡¨ç¤ºããã¾ããï¼ç°¡åãªå¯¾å¿ãªã®ã§ã¡ãã£ã¨ã«ã¼ã½ã¼ã«ã®åããè¥å¹²ããããã§ãããåä½ã¯åé¡ããã¾ãããå¤åãï¼
ã³ãããå±¥æ´ã®åç §
常ã«ç»é¢ã®ç«¯ã«å±¥æ´ã表示ãããã¨ããã®ã¯ãªããªãè¯ããã®ã§ããåãã©ã³ãã®ç¶æ³ãã¿ã°ã®ä½ç½®ãç©ã¿ä¸ãã£ãå±¥æ´ãè¦ãã¨ãã¢ããã¼ã·ã§ã³ãä¸ããã¾ãã
magit ã使ã£ãã¯ã¼ã¯ããã¼ã¨e2wm
以ä¸ãç°¡åãªæä½ã®æµãã§ãã
- ã³ã¼ããæ¸ãã¦ãããç¨åº¦ã®åºåããä»ããã¨ãã㧠magit ãã¼ã¹ãã¯ãã£ãã«åãæ¿ãã
- magit-status ãããç·¨éããå
容ã確èªããªããããã¡ã¤ã«åä½ã hunk åä½ã§ staging ã
- n, p ã§ç§»åãTABã§ãã¡ã¤ã«å 容表示ã s ã§ã¹ãã¼ã¸ã«ããã¦ã u ã§ã¹ãã¼ã¸ããæ»ããããè¤éãªã³ãã³ããè¦ããªãã¦ãã!!!
- è¯ããã° c ã§ã³ããããã°ä½æã C-c C-c ã§ã³ããããããã㯠C-c C-k ã§ãã£ã³ã»ã«ã
- ã³ãããå¾ãå±¥æ´ã§åãã©ã³ãã®ç¶æ³ãªã©ã確èªã
- ãªã¢ã¼ããªãã¸ããªã«å¯¾ã㦠P 㧠push ãF 㧠pull ã
magit ã使ã£ãã¯ã¼ã¯ããã¼
ãããã®ä½æ¥ãã¹ã ã¼ãºã«è¡ããã¨ãåºæ¥ã¾ããã¾ãã magit ã¯ã¡ãã¥ã¼ã§åãããããæ©è½ãæä¾ãã¦ãã¾ãã®ã§ãããããªãã¨ããããã ãã©ãã³ãã³ãä½ã ã£ãããªããã¨ãããããªããè¦ãã§ã大ä¸å¤«ã§ãã
çµå± e2wm ã¯ã©ãã§ãè¯ãã®ã§ã magit 使ãã¨è¯ãã¨æãã¾ãã
å°å ¥æ¹æ³
ã¤ã³ã¹ãã¼ã«ã§ããã auto-install çµç±ã§ä»¥ä¸ã®ã³ã¼ããå®è¡ãããªã©ãã¦ãã ããã
(auto-install-from-url "https://github.com/kiwanami/emacs-window-manager/raw/master/e2wm-vcs.el")
magit.el ã¯ç¾æç¹ã®ææ°ã® ver 1.0.0 ãå¿ è¦ã§ãã window-layout.el ã e2wm.el æ¬ä½ãææ°ã«ãã¦ããã¦ãã ããã
ãã¨ã¯ã e2wm ã®è¨å®ã«ä»¥ä¸ã®ããã«è¿½å ãã¾ãã
(require 'e2wm-vcs) ;; M-w ã« magit ãã¼ã¹ãã¯ãã£ãå¤æ´ãå²ãå½ã¦ (e2wm:add-keymap e2wm:pst-minor-mode-keymap '(("M-w" . e2wm:dp-magit)) e2wm:prefix-key)
ä¸ã®è¨å®ã§ããã° M-w 㧠magit ã®ç»é¢ã«ãªãã¾ãã
ãã®ãã¡ãpackage.el ã«å¯¾å¿ãã¦ç°¡åã«ã¤ã³ã¹ãã¼ã«ã§ããããã«ããããªã¨èãã¦ãã¾ãã
ãããã
e2wm ãä½ã£ã¦ãããå人çã«ã³ã¼ãã£ã³ã°ç°å¢ã¯é常ã«æ¹åãããã®ã§ããã git ã subversion ã®æä½ã¯ã·ã§ã«ããè¡ã£ã¦ãã¦ããã£ã¨åé¡ãæãã¦ãã¾ãããEclipse ã§ãã Subclipse ãç¨æãã¦ãããããªãã¼ã¹ãã¯ãã£ããå¿ è¦ãªã®ããªã¨æã£ã¦ã¯ããã®ã§ããããªããªãå®è£ ã¾ã§ãã©ãã¤ãã¾ããã§ããã
ä»å¹´ã«ãªã£ã¦ãããã°ãã magit ã使ã£ã¦ãã¦ããã®ã§ãããæ°ãã¤ãããããç¡ã㧠git ãæä½ã§ããªãä½ã«ãªã£ã¦ãã¾ãããããã§ã壮大ãªãã©ã°ã¤ã³ãä½ãã®ã¯ããã¦ã e2wm ã®ã¦ã¤ã³ãã¦ç®¡çã¨ã¶ã¤ãããªãç¨åº¦ã«ç°¡åã«çµ±åããç¨åº¦ã®å¯¾å¿ããã¦ã¿ã¾ãããããããã§åå便å©ã§ãã
ååã e2wm-vcs.el ã¨ãªã£ã¦ããã¨ããã magit ã ãã§ãªãã¦ãä»ã® VCS ãã¼ã«ã®ãµãã¼ããå¢ããã¦ãããã¨æã£ã¦ãã¾ããç¾å¨ã¯ dsvn.el (psvn.elãå¤åå¯) ã®ãã¼ã¹ãã¯ãã£ããå ¥ã£ã¦ãã¾ãããSubversion ã®å±¥æ´ã®ä¸è¦§ã¯éãã®ã§ãããã©ã«ãã§ã¯è¡¨ç¤ºããªãããã«ãªã£ã¦ãã¾ããSubversion ã¯ãªãã¸ããªãã©ã¦ã¶ãããã¨ä¾¿å©ããªã¨æã£ã¦ãã¾ãã®ã§ããã®ãã¡å¿ è¦ã«ãªã£ããä½ãã¨æãã¾ãããã以å¤ã® VCS ã«ã¤ãã¦ãèªåãå¿ è¦ã«ãªã£ããå¢ãã¦ããã¨æãã¾ãããã©ãªããããããæä¾ãã¦ããã ããã°è¿½å ãããã¨æãã¾ãã
å¾ã¯ãããã¸ã§ã¯ãã® VCS ã«ãããã¦é©åãªãã¼ã¹ãã¯ãã£ãã«åãæ¿ãããªã©ã®æ©è½ãããã¨è¯ãã®ããªã¨ãæã£ã¦ãã¾ãã
åãããããä»åã¯ç´¹ä»ã¨è¨ããã¨ã§ gdgd ãªæãã§ããã
ã¯ã¦ãªã°ã«ã¼ã::Emacsé¨
æè¿ãはてなグループ::Emacs部 ã«ãæ¸ãå§ãã¾ããã
ç´ç²ãª Emacs, Emacs Lisp ãã¿ãããã¾ãã¾ã¨ã¾ã£ã¦ãªãå°ãã¿ãªã©ãæ¸ãã¦ããã®ããªã¨æã£ã¦ãã¾ãã
http://vim-users.jp/vim-hacks-project/ ã®ãããªæãã§ãçãä¸ãã£ã¦ããã°ããã®ããªã¨ãåæã«æã£ã¦ãã¾ãã