emacsã«js2-modeãã¤ã³ã¹ãã¼ã«ãã¦ã¿ã
åè·ã®ããã¯éçºç°å¢ãWindowsã ã£ãã®ã§ãJavascriptãæ¸ãã¨ãã®ã¨ãã£ã¿ã¯xyzzyã使ã£ã¦ãã¾ããã
ä»ã¯Ubuntuã§éçºãã¦ãã¦ããã°ããgeditã§é å¼µã£ã¦ãã¾ãããããã£ã±ãemacsã®ç°å¢ãä½ããã¨ã«ã
ã¡ãªã¿ã«ãä»ã¨ãã£ã¿ã¯ãããªé¢¨ã«ä½¿ãåãã¦ãã¾ãã
RubyãPythonã®å ´åã¯ãã£ã¨ç·¨éããã¨ãã¯Emacsã使ãã¾ããããã£ã¤ãéçºããã¨ãã¯ãªãããããã¨IDEã®æ¹ã便å©ãªã®ã§IDEã使ãããã«ãã¦ãã¾ãã
ãããªããã§ã¨ããããJavascriptãå¿ è¦ãªã®ã§js2-modeã試ããã¨ã«ã
ã¡ãªã¿ã«ãã¤ã³ã¹ãã¼ã«ç´å¾ã®Emacsã§jsãèªã¿è¾¼ãã¨Javaã¢ã¼ãã«ãªã£ã¦ãã¾ãã¾ãã
emacsã«elipseç½®ãå ´ãè¨å®
emacs.dã«elisp*1ãã£ã¬ã¯ããªãä½æãã¦
$ mkdir ~/.emacs.d/elisp
.emacsã«ä»¥ä¸ã追å
(add-to-list 'load-path "~/.emacs.d/elisp")
ã¨ããã§ãelispã¨ã¯Emacs Lispã®ãã¨ã§ãããEmacs Lispã§æ¸ãããemacsæ¡å¼µç¨ã®ã¢ã¸ã¥ã¼ã«ã®ãã¨ãelispã¨è¨ãããã§ãã
js2-modeã®ã¤ã³ã¹ãã¼ã«
æ®éã¯èªåã¤ã³ã¹ãã¼ã«ãè¨å®ãã¦ããã¿ããã§ããã¨ãããããµã¤ãã®æé ã©ããæåã§ã³ã³ãã¤ã«ãã¦ã¤ã³ã¹ãã¼ã«ãã¾ããã
1. http://code.google.com/p/js2-mode/downloads/listããjs2-20090723b.el*2ããã¦ã³ãã¼ããã¾ãã
2. ãã¦ã³ãã¼ãããjs2-20090723b.elã®ååãjs2.elã«å¤æ´ãã¦.emacs.d/site-lispãã£ã¬ã¯ããªã«ç§»åãã¾ãã
3. Emacsã®ãããããã¡ã§js2.elãã³ã³ãã¤ã«ãã¾ãã
M-x byte-compile-file[Enter]
Byte compile file ~/.emacs.d/elisp/js2.el[Enter]
4. .emacsã«ä»¥ä¸ã®è¨è¿°ã追å ãã¾ãã
(autoload 'js2-mode "js2" nil t) (add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
Javascriptã®ãã¡ã¤ã«ãéãã¨ã¢ã¼ãããJavaScript-IDEãã«ãªãã¾ãã
æ§æã¨ã©ã¼ã«ä¸ç·ãã¤ãã¦ãã¨ã©ã¼ã®åå ã表示ãã¦ãããã®ã§ããã¯ãªããªã便å©ã§ãã