ãã®æãèªå® PCã«Linuxãã¤ã³ã¹ãã¼ã«ãã¦é å¼µã£ã¦ããé ã¯Emacsã使ã£ã¦ãããããã®å»¶é·ã§è·å ´ã§ãMeadowãxyzzyãªã©ãæ´»ç¨ãã¦ãããã®ã§ãããEclipseã使ãå§ãã¦ãããã£ããEmacsããé¢ãã¦ãã¾ã£ã¦ãã¾ããã
ã¨ãããããæè¿ãMacBookã使ãå§ããããä»äºæãµã¼ãã®ã¡ã³ããã³ã¹çã§ã¿ã¼ããã«ã使ãæ©ä¼ãå§åçã«å¢ããããå¨å²ã®å½±é¿ããã£ãããã¦ä¹ ãã¶ãã«Emacsã«å¾©å¸°ãã¦ã¿ããã¨ã«ãã¾ãããEmacsãã¡ããã¨ä½¿ãã®ã¯10å¹´ã¶ããããã§ãããååã®Emacserã«æãã¦ããããªããç°å¢ãæ´åãã¦ã¿ã¾ããã
ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ããããã®æºå
æè¿ã®Emacsã¯meplaã¨ãããªãã¸ããªããããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ã§ããããã§ãã~/.emacs.d/init.el
ã«ä»¥ä¸ãæ¸ãã¦ããã¾ãã
(require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/") t) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) (package-initialize)
ããã¨ãããªæãã§ããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ã§ããããã«ãªã模æ§ã
(unless (package-installed-p 'helm) (package-refresh-contents) (package-install 'helm))
ãã¼ãã§å¤è¦³ãã«ã¹ã¿ãã¤ãº
æè¿ã®Emacsã¯ã«ã©ã¼ãã¼ãã§å¤è¦³ãã«ã¹ã¿ãã¤ãºã§ããããã§ãã
(unless (package-installed-p 'atom-dark-theme) (package-refresh-contents) (package-install 'atom-dark-theme)) (load-theme 'atom-dark t)
è¥è ã£ã½ãAtomã£ã½ããã¼ãã«ãã¦ã¿ã¾ãããEmacsãä¸æ°ã«ã¢ãã³ãªæãã«ãªãã¾ãã
Scalaéçºç°å¢ã¨ãã¦ã®Emacs
ä»äºã§ã¯Scalaãæ¸ãã¦ããã®ã§Scalaã®éçºç°å¢ãæ´åããå¿ è¦ãããã¾ããEmacsã ã¨scala-mode2ã¨Ensimeã使ãã®ãããã¿ããã§ããã¤ã³ã¹ãã¼ã«ã¯Qiitaã®ãã®è¨äºãªã©ãåèã«ãªãã¾ãã使ãæ¹ã¯ãã®ã¸ããåç §ã
ããã©ã«ãã ã¨Scaladocã³ã¡ã³ãã®èªåè£å®ã®æåãå¾®å¦ã ã£ãã®ã§ä»¥ä¸ã®è¨å®ã追å ãã¦ãã¾ãã
(add-hook 'scala-mode-hook 'my-scala-mode-hook) (defun my-scala-mode-hook () (setq scala-indent:use-javadoc-style t))
ã¡ãªã¿ã«Ensimeã¯Emacså°ç¨ã¨ããããã§ã¯ãªããSublimeTextãAtomãvimç¨ã®æ¡å¼µãæä¾ããã¦ããã®ã§Emacsãã使ãã®æ¹ä»¥å¤ããæ®æ®µä½¿ã£ã¦ããã¨ãã£ã¿ã§Scalaãæ¸ãããï¼ãã¨ããæ¹ã¯ãã§ãã¯ãã¦ã¿ãã¨ããããããã¾ããã
helmã§ãªãã§ãã¤ã³ã¯ãªã¡ã³ã¿ã«ãµã¼ã
helmã¯Emacsä¸ã§ããããªãã®ãçµãè¾¼ã¿æ¤ç´¢ãããã¨ãã§ããæ¡å¼µã§ãanything.elã®å¾ç¶ã®ãããªãã®ãããã§ãã
(unless (package-installed-p 'helm) (package-refresh-contents) (package-install 'helm)) (require 'helm) (helm-mode 1) (define-key global-map (kbd "C-x C-o") 'helm-mini)
(helm-mode 1)
ãæ¸ãã¦ããã¨C-x C-f
ã§ãã¡ã¤ã«ãéãã¨ãããM-x
ã§ã³ãã³ããå®è¡ããã¨ããªã©æ§ã
ãªç®æã§helmã«ããçµãè¾¼ã¿æ¤ç´¢ã使ããããã«ãªãã¾ããhelm-miniã¯æ§ã
ãªåè£ãªã¹ããçµ±åçã«è¡¨ç¤ºãã¦çµãè¾¼ã¿æ¤ç´¢ã§ããã¤ã³ã¿ã¼ãã§ã¼ã¹ã§ãã©ã®ãããªåè£ã表示ãããã¯è¨å®ã§ã«ã¹ã¿ãã¤ãºå¯è½ã§ãã
helm-ls-gitãå ¥ããã¨Git管çããã¦ãããã¡ã¤ã«ãçµãè¾¼ã¿æ¤ç´¢ã§ããããhelm-agãå ¥ããã¨agã®çµæãçµãè¾¼ã¿æ¤ç´¢ã§ããããã¦é常ã«ä¾¿å©ã§ãã
(unless (package-installed-p 'helm-ls-git) (package-refresh-contents) (package-install 'helm-ls-git)) (unless (package-installed-p 'helm-ag) (package-refresh-contents) (package-install 'helm-ag))
agèªä½ã¯å¥éHomebrewã§ã¤ã³ã¹ãã¼ã«ãã¦ããã¾ããä»ã¾ã§grepããã¨ãã¯M-x rgrep
ãã¦ããã®ã§ãããagã¯ããããã£ã¬ã¯ããªã®ä¸èº«ã¯ããã©ã«ãã§æ¤ç´¢å¯¾è±¡ããå¤ãã¦ããããªã©æ°ãå¹ãã¦ãã¾ãã
$ brew install ag
ã§ããã°éãã¦ããScalaã½ã¼ã¹ã®ãã£ã¼ã«ããã¡ã½ããä¸è¦§ãhelmã§çµãè¾¼ã¿æ¤ç´¢ã§ãããããã¨æé«ã£ã½ãã®ã§ãããä»å¾ã®ç 究課é¡ã§ãã
gitã®æä½ãEmacsã§
Emacsã使ã£ã¦ããããã«ã¯gitã®æä½ãEmacsã§å®çµããããã®ã§ããmagitãå ¥ããã¨Emacsä¸ã§æ§ã ãªgitæä½ãå¯è½ã«ãªãã¾ãã
(unless (package-installed-p 'magit) (package-refresh-contents) (package-install 'magit))
åºæ¬çã«ã¯M-x magit-status
ã§è¡¨ç¤ºã§ããã¹ãã¼ã¿ã¹ç»é¢ããæ§ã
ãªæä½ãè¡ãã¾ããã³ãããã®å±¥æ´ãã°ã©ã表示ã§ãããªã©ããªãé«æ©è½ã§ãããæåã¯åã£ä»ããæªãã§ããåºæ¬çãªæä½æ¹æ³ããè¦ããã°ç´°ããæä½ã¯ç»é¢ã«ã¬ã¤ãã表示ãããã®ã§ãã»ã©è¿·ããã¨ã¯ãªãã®ã§ã¯ã¨æãã¾ãã
è¤éãªæä½ã¯gitã³ãã³ããGUIã¯ã©ã¤ã¢ã³ãã使ã£ã¦ãããã§ãããã³ããããããã·ã¥ã¨ãã£ãæ¥å¸¸çãªæä½ãEmacsã§å®çµããã ãã§ãããªãå¿«é©ã«ãªãã¾ããã
ace-jumpã§ã©ãã«ã§ãä¸çºã¸ã£ã³ã
vimã«ã¯ç»é¢ã§è¦ãã¦ããã©ã®å ´æã«ã3ãã¼ã¹ããã¼ã¯ã§ç§»åã§ããã¨ããeasymotionã¨ããæ¡å¼µæ©è½ããããããªã®ã§ãããace-jumpã使ãã¨Emacsã§ãåããã¨ãã§ãã¾ãã
(unless (package-installed-p 'ace-jump-mode) (package-refresh-contents) (package-install 'ace-jump-mode)) (require 'ace-jump-mode) (define-key global-map (kbd "C-c SPC") 'ace-jump-mode)
æç« ã ã¨èª¬æãé£ããã®ã§ãããC-c SPC
ãæ¼ãã¦ãããããã¡ã§ç§»åãããå ´æã®æåãå
¥åããã¨è©²å½ã®ç®æã«ãã¤ã³ã¿ã¨ãªãæåã表示ãããã®ã§ããã®ãã¼ãå
¥åããã¨ããã«ã¸ã£ã³ãã§ããã¨ãããã®ã§ãããã®ãã¼ãã¤ã³ãã ã¨C-c
ãããã®ã§4ã¹ããã¼ã¯ã«ãªã£ã¦ãã¾ãã®ãæ¬ ç¹ã§ãã
ããªã¼åã®ãã¡ã¤ã«ããã¼ã¸ã£
ç®çã®ãã¡ã¤ã«ãéãã¨ãã¯helmã使ãã°ããã®ã§ãããããã¸ã§ã¯ãå ¨ä½ã俯ç°ãããå ´åããã¡ã¤ã«ããã£ã¬ã¯ããªã®æä½ãè¡ãããå ´åã¯helmãæ¨æºã®diredã ãã ã¨ã¡ãã£ã¨ä¸ä¾¿ã§ããã§ããã°ããªã¼ç¶ã®ãã¡ã¤ã«ããã¼ã¸ã£ã欲ããã¨æãæ¢ãã¦ã¿ãã¨ããããã¤ãè¦ã¤ãã£ãã®ã§ããã試ãã¦ã¿ãã¨ããneotreeãããããã§ãã
F8
ã§ãã°ã«ããããã«ãã¦ã¿ã¾ããã
(unless (package-installed-p 'neotree) (package-refresh-contents) (package-install 'neotree)) (require 'neotree) (global-set-key [f8] 'neotree-toggle)
ããããã°æã¯speedbar使ã£ã¦ããªã¼ã¨æãåºãã¦æãããæ°æã¡ã«ãªãã¾ããã
Atomã®ããªã¼ãã¤ã³ã¿ããã«gitã®ã¹ãã¼ã¿ã¹ã«ãã£ã¦ãã¡ã¤ã«ã®è²ãå¤ãã£ããããã¨ç´ æµãªãã§ããâ¦ã
ã¦ã£ã³ãã¦ã®ãªãµã¤ãºãç°¡åã«
Emacsã§ã¯C-x 2
ãC-x 3
ã§ã¦ã£ã³ãã¦ãåå²ã§ããã®ã§ãããåå²ããã¦ã£ã³ãã¦ã®ãµã¤ãºã®å¤æ´ã¯ããã©ã«ãã§ã¯ããªãå¤æ
çãªãã¼ãã¤ã³ãã«å²ãå½ã¦ããã¦ãã¾ããã°ã°ã£ã¦ã¿ãã¨ããQiitaã«ãããªè¨äºãè¦ã¤ãã¾ãããC-c C-r
ã§ã¦ã£ã³ãã¦ãµã¤ãºå¤æ´ã¢ã¼ãã«å
¥ããh
ãj
ãk
ãl
ã§ãµã¤ãºèª¿æ´ãã§ããããã«ãªãã¾ãã
ãã¡ãããã®ä»ã«ã使ç¨ããããã°ã©ãã³ã°è¨èªã®ããã®ã¡ã¸ã£ã¼ã¢ã¼ããã¤ã³ã¹ãã¼ã«ããããã¿ãå¹ ãªã©ç´°ããè¨å®ãå ãã¦ãã¾ããããæ°é±éEmacsã§ã³ã¼ãã£ã³ã°ãã¦ããã®ã§ããããããã以åã®åãåãæ»ãã¦ããæããããIntelliJã使ããªãã¦ã大æµã®ãã¨ã¯å°ããªãç¶æ ã«ãªã£ã¦ãã¾ããããååã®å¤æ vimmerã«ã¤ã³ã¹ãã¤ã¢ãããæ¥ã Emacsç°å¢ã®ç 究ãéããæ¥ã ãç¶ãã¦ãã¾ãã