Emacs ã®ã·ã§ã«ã¢ã¼ãæ¯è¼ - shellãansi-termãmulti-term
æè¿ã¡ããã¡ãã㨠Carbon Emacsï¼Emacs 22.3ï¼ã®ã·ã§ã«ã¢ã¼ãã®ããã¤ãã試ãã¦ãã¾ãããããããã²ã¨åºåãã¤ãããã¨æãã®ã§ãã¾ã¨ãã¦ããã¾ãã
試ããã®ã¯æ¬¡ã® 4ã¤ã®ã¢ã¼ãã§ãã
-æ¨æºã·ã§ã«ã¢ã¼ãï¼shellï¼ -ansi-termï¼termï¼ -multi-term -eshell
*ããããã©ããã使ãæ¹ããã¦ããã®ã
ã¨ããã§ãããã Emacs ã®ã·ã§ã«ã¢ã¼ããæ®æ®µã©ã使ã£ã¦ãããã¨ããã¨ã主ã«ä½æ¥ãã°ãã¾ã¨ããã®ã«ä½¿ã£ã¦ãã¾ãã
Python ã Ruby ã®å¯¾è©±ã¢ã¼ãã§ãããã£ãããããã£ãã¨ããMacPorts ãããããã¤ã³ã¹ãã¼ã«ãããã¨ãã¦ãã¾ããã£ãããããªãã£ãã¨ãããè¨é²ããã¨ã§è¦ãããããã«é©å½ã«æ´å½¢ã㦠Evernote ã¸æ¾ãè¾¼ããEvernote ã¸æ¾ãè¾¼ãåã®ãæ´å½¢ãæã«ã¯ãã¿ã¼ããã«ããã³ããããããã Emacs ã®ã·ã§ã«ã¢ã¼ãã使ã£ãã»ããæç¶æ©ããããã¨ããã®ã使ã£ã¦ããçç±ã§ãã
*çµæ§æã«é¦´æãæ¨æºã·ã§ã«ã¢ã¼ã
ã¨ããããã§ãã¾ãã¯æ¨æºã®ã·ã§ã«ã¢ã¼ãã
|| M-x shell ||<
ã§èµ·åã§ãã¾ãã
ã¤ã¾ããªãã¹ãã«ãã¹ã®ã³ãã³ãã¨ããæã£ã¦ãã¾ã£ã¦ããã®å ´ã§åºåçµæãã¨æ¶ãã°è¯ãããã³ãã³ããæã¡ããã¨ãã«ä»¥åã®åºåçµæãªã©ããã«ï¼ã¤ã³ã¯ã§ããããä½ãã¨æã«é¦´æã¿ã¾ããã³ãã³ãã®åºåçµæãç·¨éããããããã¡ã«è²¼ãä»ããç¨éã«ã¯æ¨æºã®ã·ã§ã«ã¢ã¼ããä¸çªé©ãã¦ãããããªæ°ããã¾ãã
ããã§ãã¿ããã¼ã«ããè£å®æ©è½ãå¼±ãã£ãããã³ãã³ãã©ã¤ã³å±¥æ´ããã®æ¤ç´¢ãããã©ã«ãã§ã¯ã§ããªããããå··ã§ã¯ãã¾ãè©ä¾¡ã¯é«ããªãããã§ãã
< ãã®ã¢ã¼ãã¯ã¿ã¼ããã«ã¨ãã¦ã®æ©è½ã«å¶éãããã¾ãã端çã«ã¯ï¼»tabï¼½ã«ããè£å®ãªã©ãæ©è½ãã¾ãããï¼ãã¿ã¼ããã«ã½ããã¦ã§ã¢ãã¨ãã¦ã¯ä¸å®å ¨ãªãã®ã§ããå¤ãã®å ´åï¼ãã®ã¢ã¼ãã¯ãã¾ãå½¹ã«ç«ããªãã¨æããã¾ãã<
ã²ã©ãè¨ããããã§ããï¼ç¬ï¼ãåãã²ã¨ã¤ã ãä¸æºãè¨ãã¨ãgit diff ã®ã¨ãã«ã©ããã¦ã«ã©ã¼è¡¨ç¤ºãç¡è¦ãããã®ãä¸æè°ã
*ansi-term ã¯æ¬å½ã«ã·ã§ã«ã§ãã
次ãansi-termï¼termï¼ã¯ãEmacs Lisp ã§æ¸ããã端æ«ã¨ãã¥ã¬ã¼ã¿ã§ãã
|| M-x ansi-termï¼ã¾ã㯠M-x termï¼ ||<
ã§èµ·åãã¾ãã端æ«ã¨ãã¥ã¬ã¼ã¿ãªã®ã§ãã·ã§ã«ã®æ©è½ãã»ã¼ãã®ã¾ã¾å©ç¨ã§ãã¾ããBash ã ãã¯ãªã Zsh ãªã©ã使ããããã§ãã
使ã£ãæããè¯ããæªããã·ã§ã«ãã®ã¾ãã¾ã§ããã使ãæ £ããã¿ã¼ããã«ã¨ã»ã¨ãã©åãæåãªã®ã§ãéåæãªãæ±ããä¸æ¹ãåºåçµæããããã¡ã«è²¼ãä»ãããã¨ãã£ããç·¨éãæ©è½ã¯æ±ãã¥ããã£ãã§ãã
ã¾ããEmacs ã®ãã¼ãã¤ã³ããçµæ§å¥ªããããããã®ã§ã
ããã ã£ãããã·ã§ã«ãå¥åã«ä½¿ã£ãã»ããããããªã¼ <<
ã¨ããææ³ã«è³ãã¾ããã
*ansi-term ã®æ¬ ç¹ãè£ã£ã multi-term
ansi-term ã¯åªç§ã§ãã Emacs ã¨ã®è¦ªåæ§ãä½ãã®ã§ãæ¡å¼µã¢ã¼ããã¤ãããã¾ãããããã multi-term ã§ãã
< multi-term 㯠term ãæ¡å¼µããã¢ã¼ãã«ãªãã¾ããterm ã¯ç¢ºãã«åªããã¢ã¼ãã§ããããã¤ãã®åé¡ãåå¨ãã¦ãã¾ãã-è¤æ°èµ·åãã§ãã¾ãã -Emacs ã®æ¨æºçãªãã¼ãå¤æ°å¥ªã£ã¦ãã¾ãã¾ã -exit ãã¦ããããã¡ãæ¶ãã¾ãã -Emacs çµäºæã« term å ã® shell ãçµäºãã¦ããªãã¨èªåã§çµäºãã¦ããã¾ãã -ãããã°ããã°ã©ã ã®ããã®å°ç¨ã¦ã£ã³ãã¦ãæã¡ã¾ãã ãããã解決ããããã« multi-term.el ãå©ç¨ãã¾ãã
<
multi-term ã¯æ¨æºã§ã¯ä½¿ãã¾ããããä¸è¨ URL ãããã¦ã³ãã¼ãã§ãã¾ãã
-http://www.emacswiki.org/emacs/download/multi-term.el
åæåãã¡ã¤ã«ï¼~/.emacs çï¼ã«
|lisp| (require 'multi-term) ||<
ãè¨è¿°ãã¦ããã¦ã
|| M-x multi-term ||<
ã§èµ·åãã¾ãã
å®ã¯ãã®ã¢ã¼ãã¯ã¤ãæè¿ã¾ã§ç¥ããªãã£ã¦ãid:tomoya ããã«æãã¦ãããã¾ããã試ãã¦ã¿ã¦ããªãã¨ãããã確ãã« shell 㨠ansi-term ã®è¯ãã¨ãåããªæãããã¾ããåºåçµæãèªç±ã«ç·¨éã§ããããè£å®æ©è½ã使ãã¾ãã
ããããä¾ãã°ãlsãã³ãã³ããæã¨ãã¨ãã¦èª¤ã£ã¦ãllãã£ã¦æã£ãå¾ã«ãlããã²ã¨ã¤æ¶ãã¦ãããsãã追å ãã³ãã³ããå®è¡ããã¨ãã¾ãã誤ã£ããlãã delete ãã¿ã³ã§æ¶ããã¨ãã«ã¯æå³ããã¨ãããlsãã³ãã³ããå®è¡ãããã®ã§ãããC-h ã«å²ãå½ã¦ã¦ãã delete-backward-char ã³ãã³ãã§æ¶ããã¨ãã«ã¯
lls: command not found <<
ã¨æããã¦ãã¾ãã¾ã...ã¨ããã®ã¯ä¸ä¾ã§ãããä»ã«ã ãã(-ã-;) ã¨ãªããããªæåãããã¤ãããã¾ãããmulti-term ã¯ç«¯æ«ã¨ãã¥ã¬ã¼ã¿ãªã®ã§ãã¼å ¥åããã®ã¾ã¾ããã»ã¹ã«è¡ã渡ãã®ãåå ã ã¨æãã®ã§ãããansi-term ã§ã¯åæ§ã®ãã°ï¼ï¼ï¼ã¯ãªãã£ãã®ã§ããªãã ããªã¼ã¨æã£ã¦ãã¾ãã¾ããã
ãã¨ãåã®ç°å¢ã§ã¯ä¸è¨ã®ãããªè¦æ ãã¨ãªããã¡ãã£ã¨ãããªãã
ããããã¡ããè¨å®ãå¤æ´ãã¦ããã°æ¸ãããã·ãªãã§ãããä»ã¯ã¡ãã£ã¨ããã«å²ãæéãã¤ããåºããªãã®ã§ä»åã¯ãã¹ãã¾ããã
*eshellãããããªãã
æå¾ãeshell
|| M-x eshell ||<
ã§èµ·åãã¾ããEmacs Lisp ã®ã¿ã§å®è£ ãããã·ã§ã«ã¢ã¼ãã§ããEmacs Lisp ã§ããªãé«åº¦ã«ã«ã¹ã¿ãã¤ãºã§ããããã§ãããéã«ãã®ç¹ã使ãããªãã®ã«æéããããããã«æãã¦ãã¾ããã¹ãã¾ããããã¿ã¬ã§ããããªããã
*çµè« - åºåçµæã®ç·¨éç¨éã«ã¯æ¨æºã·ã§ã«ã¢ã¼ããä¸çª
çµå±ãã©ã®ã·ã§ã«ã¢ã¼ãã使ãã¹ããã¯ä½¿ãéã«ããã¨æãã®ã§ãããåã®ããã«åºåçµæã®ç·¨éã«ç¹åãã使ãæ¹ã ã¨æ¨æºã·ã§ã«ã¢ã¼ãããæ軽ã§ç´ æ´ãããã¨æãã¾ãããå°ãªãã¨ãç¾æç¹ã®èªåã«ã¯åç¸å¿ã¨ããæãããã¾ããå··ã®æè¦ã¨ã¯çµæ§ç°ãªãã¨ãããããã¾ããããããã人ããããã¨ãããã¨ã§ã
ã§ã¯ã§ã¯ã
*ãã¾ã - ãã®ããã³ãã¡ãããã¯ãã©ããã¦ãããã ããï¼ï¼
ã¡ãªã¿ã«ãæ¥æ¬ã® Emacs 第ä¸äººè ãã³ãã¡ããã¯ãæ¬ã®ä¸ã§ä¸è¨ã®ããã«æ¸ããã¦ãã¾ãããåèã¾ã§ã
Emacsãã¯ããã¯ãã¤ãã«ã?ä½æ¥å¹çãã«ã¤ã¼ã³ãã200ã®æ?
- ä½è : ãã³ãã¡
- åºç社/ã¡ã¼ã«ã¼: æè¡è©è«ç¤¾
- çºå£²æ¥: 2010/08/03
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- è³¼å ¥: 27人 ã¯ãªãã¯: 1,039å
- ãã®ååãå«ãããã° (68件) ãè¦ã
Emacs ã§ã·ã§ã«ã¯åããã¾ãããçè 㯠zsh ã使ã£ã¦ããã®ã§ãM-x shell ã®è£å®ã®å¼±ãã¯ææ ¢ã§ãã¾ãããæã¯ä½¿ã£ã¦ãã¾ããããzsh ã®ç練度ãä¸ããã«ã¤ãã¦ãã¡ãªããã®æ¹ãä¸åã£ãã®ã§ããM-x multi-term ãé ãã®ã§ä½¿ã£ã¦ãã¾ããã <<
*åèãµã¤ã
-Emacs 上で快適に Bash や Zsh を利用する設定 : 紹介マニア -Emacs で Shell を使うには何がいいかを模索中。 - 日々、とんは語る。