æ´æ°å±¥æ´ 2008-06-20: å ¬é js2-mode ããã¨ãªããããã js2-mode 㯠Emacs 㧠JavaScript ãæ¸ãããã® major-mode ã§ãã å¤é¨ã® JavaScript å¦çç³»ç¡ãã« (flymake ã®ããã«) ææ³ä¸ã®ã¨ã©ã¼ã表示ãããªã©ã ããªãæ欲çãªæ©è½ãåãã¦ãã¾ãã ããããã®ä¸æ¹ã§ãjs2-mode ã®ããã©ã«ãã®æåã¯ããªãç¬ç¹ã§ãã ããã§ã¯ããããã®æåãä»ã® major-mode ã¨ããããæ¹æ³ã説æãã¾ãã ã¤ã³ã¹ãã¼ã« js2-mode ã¯ãã¡ã¤ã«åä½ã§é å¸ããã¦ãã¾ãã®ã§ãããã load-path ã®éã£ãå ´æã«ç½®ãã¾ãã % wget http://js2-mode.googlecode.com/files/js2-20080616a.el % mv js2-20080616a.el /PATH/TO/js2.el
ã横éã«ãããããã«æ¸ããäºæ ã§ãEmacsã§JavaScriptã½ã¼ã¹ã³ã¼ããèªãç°å¢ãå°ãæ´ããããã¨ã 次ã®2ã¤ã®ãã¼ã«ãå°å ¥ãã¦ã¿ãããã£ã¨ã js2-modeï¼ http://code.google.com/p/js2-mode/ ã¨ã°ãºã¼ãã©ã³ãï¼EXUBERANTï¼Ctagsï¼ http://ctags.sourceforge.net/ å å®¹ï¼ ããè¯ãEmacs JavaScriptã¢ã¼ã -- js2-mode å¼·çãªã¿ã°ãã¡ã¤ã«ä½æãã¼ã« -- ã¨ã°ãºã¼ãã©ã³ãCtags ã¨ã°ãºã¼ãã©ã³ãCtagsã調ã¹ã¦ã¿ã Emacsã§JavaScriptã½ã¼ã¹ãèªã âããè¯ãEmacs JavaScriptã¢ã¼ã -- js2-mode 以åï¼2006å¹´7æï¼ãã²ãã½ãããã®è¨äºã§ããecmascript-mode.el ï¼ javascript.el ã¿ããã ãã¨æ¸ãã¦ãã£ã
ãªã㥠Emacsã§ã¯ãéå»ã«å®è¡ããã³ãã³ãããã®ã¾ã¾åå®è¡ããäºãå¯è½ã§ããã ãããredo(ãªãã¥ã¨èªã)ã¨ãããä¸è¬çã«undo ãåãæ¶ã(undoãundoãã)ãã¨ãredoã¨ããå ´åã ãããããããredoã®å®ç¾©ã¨ãããªãã°ãããã¯Emacsã®undo ã®ä¸ã«å«ã¾ãã¦ããæ©è½ã§ãããEmacsã§ããredoã¯ãç´åã®å®è¡ãç¹° ãè¿ãã¨ããæå³ã§ããã Emacsã§è¡ãªãããredoã¯ããã¹ã¦ã®åä½ãåå®è¡ãããã®ã§ã¯ãªãã éå»ã«å®è¡ããã³ãã³ãã®ãã¡ãä¸è¬ã«ãªãããã®å ¥åãå¿ è¦ã¨ãããã®ãã ããã¯ãM-xã®å¾ã«ãªãããã®ã³ãã³ããç¶ãã¦æã£ã¦å®è¡ãããã®ã åå®è¡ã§ãããã®ã§ãããä¾ãã°ãaã®å ¥åãªã©ã¯ãaã®ãã¼ã æ¼ãã°å ¥åã§ãããããããããè¤éãªæä½ããã¦redoããå¿ è¦ã㪠ãããããããã¡ã¤ã«ã®èªã¿è¾¼ã¿ãªã©ã¯ããã¡ã¤ã«åã®å ¥åæä½ãå¿ è¦ãªããã åå®è¡ãã
Recent entries 宣ä¼ï¼C/C++ã®ããã®éçºè£å©ãã¼ã«ãGCCSenseããªãªã¼ã¹ãã¾ãã matsuyama 2010-04-15 宣ä¼ï¼Rubyã®ããã®éçºè£å©ãã¼ã«ãRSenseããªãªã¼ã¹ãã¾ãã matsuyama 2010-03-21 Emacsã¯æ»ãã matsuyama 2010-02-22 Webã¢ããªã±ã¼ã·ã§ã³ãiPhoneã«å¯¾å¿ãããããã®æè¡ã¡ã¢ matsuyama 2009-10-13 tokyo-emacs#x02ã®å人çã¬ãã¼ã matsuyama 2009-09-07 Recent comments replica louis vuitton Anonymous User 2010-12-22 Re:ããã¹ãå ¥åä¸ã«è£å®åè£ãèªåçã«è¡¨ç¤ºãã¦ããã auto-complete.el ããªãªã¼ã¹ãã¾ãã Anonymous User 2010-12
社å ã®vim使ããåçç¥èªè£å®ã便å©ã ã¨èªæ ¢ãã¦ããã®ã§ããã®ããããããã¾ããã£ãã®ã§Emacsã§ã§ããªãã調ã¹ã¦ã¿ãã ãããã£ãã ãã§ãã£ã¦ãdabbrevãæ¥æ¬èªã§ä½¿ãããã®EmacsãLispãçºè¦ã 使ãæ¹ã¨ãã¦ã¯dabbrev-ja.elããã¦ã³ãã¼ããã¦ç»é²ããã§ãã£ã¦loadããã ãã èªåã¯ãã¼ãã¤ã³ãã使ããããå ´æ(C-j)ã«å¤æ´ã ;;åçç¥èªè£å®dabbrev-jaã®load (load "dabbrev-ja") (global-set-key "\C-j" 'dabbrev-completion) ;;ããã©ã«ãã¯M-/ å人çã«é·ãå¤æ°åãã¤ãããã¨ãå¤ãã®ã§ããã便å©ã ãããã¡å ããåçã«åèªãè£å®ãã¦ãããã¨ããã¨ãããè¨å®ãã¡ã¤ã«ãããã§æ¥½ã ãåèURLã æ¥æ¬èªã§ dabbrev ã使ã â dabbrev-ja
æè¿ãããããã£ããã¡ãã£ã¨ä¾¿å©ã«ãªã£ãã®ã§ç´¹ä»ã auto-complete-mode ç·¨éä¸ã®Bufferã®åèªãè£å®ã§ããã æ¨æºã ã¨ã«ã¼ã½ã«ãã¼ãæ¼ããªãã¨ãããªããã©ãåè£ã®ä¸ããC-n, C-pã§é¸æã§ããããã«ããã (require 'auto-complete) (global-auto-complete-mode t) (define-key ac-complete-mode-map "\C-n" 'ac-next) (define-key ac-complete-mode-map "\C-p" 'ac-previous) æ¬å½ã¯ãå ¨é¨ã®Bufferããè£å®ã§ããããã«ããããã©ãåãããªãã®ã§ããã®ã¨ãã ãM-/ã§è£å®ãã¦ãã iswitchb-mode (iswitchb-mode 1) Bufferãã¤ã³ã¯ãªã¡ã³ã¿ã«ãµã¼ããã¦åãæ¿ããããã 以åã¯Bufferã®
key binding ãã¦ãã次ã¯ãã¼ãã¤ã³ãã§ã. 次ã®ãããªãã¨ã念é ã«ããã¦å¤ãã¦ãã¾ã. èªåã§ã¯ç´ ç´ã ã¨æããã§ãã. è¯ã使ãã®ã¯ 1ã¹ããã¼ã¯. ã«ã¼ã½ã«ãã¼ã¯ä½¿ããªã(é ã). ãã¹ã¦ Ctrl ãã¼ãä»ãããã®ã¨ã, Esc ãã¼ã¯ä½¿ããªã(é ã). ãã¬ãã£ãã¯ã¹ãã¼ã¯ãã¼ã ãã¸ã·ã§ã³. å ¨ä½çã«, emacs ã®ããã©ã«ãã®ãã¼ãã¤ã³ãã¯ã©ãèãã¦ã人éå·¥å¦ãç¡è¦ã ã¦ããã¨ããæããªãã®ã§, ã«ã¹ã¿ãã¤ãºããªãæã¯ããã¾ãã. å ¨ã¦ Ctrl ãä»ãããã®ã¨ããã®ã¯ã C-d j ã§ã¯ãªã C-d C-j ã§ãã¨ãããã¨ã§ãããªããªãã°ãC-d j ã¯ä¸åº¦ãã¼ãã¼ããå®å ¨ã«ãã¥ã¼ãã©ã«ã«ãã å¿ è¦ããããããé£ç¶ãã¦æéµã§ãã C-d C-j ããã確å®ã«é ããªãããã§ãã èªåã®ãã¤ã³ãã«ã¯ C-d C-f C-m ã¿ãã㪠3 æéµã®ã³ãã³ããããã¾
ref:Emacsã§ãã¼ãã¤ã³ããã«ã¹ã¿ãã¤ãºããããã®è¦æ¸ - gan2 ã® Ruby åå¼·æ¥è¨ ãããããdefine-key ãªããã§ä½¿ãããã¼ã®æå®æ¹æ³ã£ã¦ãããããããªãã ãã®ã¾ã¾æåå㧠C-a 㯠\C-a ãªã©ã¨æå®ããã (global-set-key "\C-x\C-m" 'anything) å®ã¯ Emacs ä¸ã§ã¯ enter key 㯠C-m ã¨å義ã ã£ããããã¨ãTAB 㯠C-iã kbd kbd é¢æ°ã使ãã (global-set-key (kbd "C-x RET") 'anything) å¯èªæ§é«ããå¤åãdescribe-key (C-h c) ããã¨ãã«è¡¨ç¤ºãããã®ã¨åãç©ã使ããã vector vector ã使ããã (global-set-key [(ctrl x) return] 'anything) ã¾ããããããããªããä¾ãã° C
å¿ããªãããã«ã¡ã¢ãã¦ããã¾ãã ã¨ããããåãç¥ã£ã¦ããã¿ã¯ããã«å ¨é¨æ¸ãã¾ããã global-set-key ã使ã£ã¦ C-x l ã« goto-lineï¼æå®è¡ã¸ã¸ã£ã³ãï¼ããã¤ã³ããã (global-set-key "\C-xl" 'goto-line) âã¨åããã¨ã define-key ã使ã£ã¦ (define-key global-map "\C-xl" 'goto-line) âã¨åããã¨ã ctl-x-map ã使ã£ã¦ (define-key ctl-x-map "l" 'goto-line) ãã¼ãã¤ã³ãã®å²ãå½ã¦ã«ã¯ define-key ã使ããã define-key ã®æ¬¡ã«ããã®ã¯ãã¼ãããã¨ãããã¤ã§ã Emacs ã§ä½¿ããä¸çªåºæ¬çãªãã¼ããã㯠global-map ã¨ããã ã¾ããä»ã«ãã¢ã¼ããã¨ã«è²ã ãªãã¼ããããããã ä¾ãã°ãdired-mo
Emacs / Meadow ã®åºæ¬æ©è½ã®æ¡å¼µãªã©ã«é¢ããæ å ±ãããã® page ã§ã¯æ²è¼ãã¦ãã¾ãã ãåæ¸ã i-search ã§æ¥æ¬èªã使ããã ããã¹ãã«è²ãã¤ãã¦è¦æãããã foreground-color 㨠background-color ãå ¥ãæããã redo ã使ããã ã¡ãã¥ã¼ãæ¥æ¬èªåããã (Meadow ã®ã¿ï¼) ã¿ã¤ãã«ãã¼ãã«ã¹ã¿ãã¤ãºããã C-h ã backspace ã¨ãã¦ä½¿ããã mini buffer ã kill-ring çã®å±¥æ´ã次åèµ·åæã«æã¡è¶ããã kill-ring ã®å 容ãè¦è¦çã«ç¢ºèªããªãã yank ããã window åå²æãç»é¢å¤ã«åºãæç« ãæãè¿ããã èµ·åæã«åºã¦ãã message ãæ¶ããã ç½®æããªã¼ã¸ã§ã³æå®å¯è½ã«ããã autosave file ã®çæå ´æãæå®ããã C-z 㧠scroll-dow
wb-line-numberã使ãã¨ãã¦ã¤ã³ãã¦å·¦å´ã«è¡çªå·ã表示ããããã®ã¦ã¤ã³ãã¦ã表示ããã¾ããwb-line-numberéçºè ã®ãµã¤ããããwb-line-number.elãåå¾ããemacs-lispã®ãã¹ã®éã£ãæã«åç´ãã¾ãã .emacsã«ã¯ (require 'wb-line-number) ã¨æ¸ãã¦ãå¿ è¦ãªæã«M-x wb-line-number-toggle ã¨ããããEmacsã®èµ·åæãã使ãå ´åã¯ã (wb-line-number-toggle) ã追å ãã¦ããã¾ãã åè wb-line-numberéçºè ã®ãµã¤ã æåã³ã¼ããæå®ãã¦ãã¡ã¤ã«ãèªã¿ç´ããã åèï¼blog.woremacx.com ãã¡ã¤ã«ãåã«èªã¿ç´ãã«ã¯ M-x find-alternate-file (C-x C-v) ãã¡ã¤ã«ã®æåã³ã¼ããæå®ãã¦ãèªã¿ç´ãã«ã¯ M-x unive
Emacsã§ã¯ãããã¡ãã¨ã«æåã³ã¼ãã®åãæ±ããå¤ãããã¨ãã§ããï¼ å¤æ´ã§ããæåã³ã¼ãã«ã¯ï¼ä¸»ã«æ¬¡ã®3ã¤ãããï¼ âãã¡ã¤ã«æåã³ã¼ã ãããã¡ã®å 容ããã¡ã¤ã«ã«æ¸ãè¾¼ãã¨ãã®æåã³ã¼ã âãã¼ãã¼ãæåã³ã¼ã Emacsã«ãã¼ãã¼ãããå ¥åãããã³ã¼ãã§ï¼ç«¯æ«ãéãåºãæåã³ã¼ãã¨ãã¼ãã¼ãæåã³ã¼ããä¸è´ããã¦ãããã°ãªããªã âãã£ã¹ãã¬ã¤æåã³ã¼ã Emacsãã端æ«è¡¨ç¤ºç¨ã«éãåºãããæåã³ã¼ãã§ï¼ç«¯æ«ã®è¡¨ç¤ºã«ç¨ããããã³ã¼ãã¨ãã£ã¹ãã¬ã¤ã³ã¼ããä¸è´ããã¦ãããã°ãªããªã ä»ã«ï¼å¤é¨ããã»ã¹ã¨éä¿¡ããã¨ãã«ç¨ããããããã»ã¹æåã³ã¼ãï¼ã³ãã¼&ãã¼ã¹ã ãªã©ã«ä½¿ãã»ã¬ã¯ã·ã§ã³è»¢éæã®æåã³ã¼ããªã©ãå¤æ´ã§ããï¼ ç·¨éä¸ã®ãããã¡ã®æåã³ã¼ãã»æ¹è¡ã³ã¼ãã®å¤å® ä»ï¼ä½¿ã£ã¦ããç·¨éãããã¡ã§ã¯ã©ããªæåã³ã¼ããæ¹è¡ã³ã¼ãã使ã£ã¦ãããã¯Emacsã¦ã£ã³ãã¦ä¸é¨ã«ããé»ã©ã¤ã³è¡
emacsclientã使ãã¨ãæ¢ã«éããã¦ããEmacsã使ã£ã¦ãã¡ã¤ã«ãç·¨éã§ããã®ã§ä¾¿å©ã æ®éã®ä½¿ãæ¹ .emacs.elã« (server-start)ãã¦ããã¨ï¼Emacsèµ·åæã«Emacs Serverãåãã®ã§ï¼ãã以å¾ã¯ï¼ä»ã®ç«¯æ«ãªã©ãã emacsclient ãªããã.txtããã¨ï¼ãªãã¨ï¼å ã«éããã¦ããEmacsã§ï¼ãªããã.txtãéãããã ååã¨ãï¼ï¼åç®ä»¥éã¨ãæ°ã«ããããªã人(ã¨ã«ããï¼åã®Emacsã§å¦çããã)ã¨ãã人ã¯ï¼ alias emacs="emacsclient -a emacs"ãã¦ããã¨ããã-aã¯--alternate-editorã§ï¼ãµã¼ãã¼ã«ã¤ãªããªãã£ãã¨ãã«éãã¨ãã£ã¿ã§ï¼ãµã¼ãã¼ã«æ¥ç¶ã§ããªãã£ãå ´åã«ä½¿ãã¨ãã£ã¿ãæå®ããã ãã®aliasãè²¼ã£ã¦ããã¨ï¼æåã®ï¼åã ãEmacsãæ°ãã«ç«ã¡ä¸ãã£ã¦ï¼ãã以å¾ã¯ãã®Emac
back ã¯ããã« ãã®ããã¥ã¢ã«ã¯ emacs (ããã㯠mule) ã使ãã¯ããã¦ã¾ã éããªãé 㮠人ã®ããã®ãã®ã§ããemacs ãä¸åº¦ã使ã£ããã¨ã®ãªã人ã¯æ®å¿µãªãã 対象ã¨ãã¦ãã¾ãã (ãããã人ã«ã¯ emacs ä»å±ã®ãã¥ã¼ããªã¢ã«ããããã¾ã)ã ãããèªãã§ã emacs ãå¿«é©ã«ä½¿ããããã«ãªããã©ããã¯ããªã次第ã§ãã emacs ã¯ãã¦ã¹ãã«ã¼ã½ã«ãã¼ã§æä½ãããã¨ãã§ãã¾ããã ãããã使ã£ã¦ããããã§ã¯ä¸éããªãã¨ãããã¨ã è¦ãã¦ããã¦ãã ããããã®ããã¥ã¢ã«ã¯ããã®äººã«ãèªããããã«æ¸ãã ã¤ããã§ãããåºæ¬çã« csc (æ±å·¥å¤§ æ å ±å·¥å¦ç§ è¨ç®æ©å®¤) 㧠emacs ã 使ç¨ãã人ã対象ã¨ãã¦ãã¾ãããã®ãããæ¥æ¬èªå ¥åç°å¢ãã¡ã¼ã«ç°å¢ã«ã¤ãã¦ã¯ å¿ ãããããªãã®ãµã¤ãã¨ã¯ä¸è´ããªãããããã¾ããã®ã§æ³¨æãã¦ãã ããã åºæ¬çãªã㨠ãã¡ã¤ã«æä½ ã«ã¼
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}