æè¿ãã£ã¨Emacsè¨å®ããããå¼ãããæã«å
¥ã£ã¦ãã¦ãé·ããæ¾ç½®ãã¦ããdotfilesãã¡ããã¡ããå¤ãã¦ãã£ã¦ããã
packageã¨init-loader
ãã¾ã®init.el
ã¯ãããªãããã
(eval-when-compile (require 'cl)) ;; package.el setting (require 'package) (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t) (package-initialize) ;; install if not installed (defvar my-package-list '(auto-async-byte-compile auto-complete cperl-mode direx helm helm-ag helm-descbinds helm-ls-git init-loader js2-mode magit markdown-mode open-junk-file recentf-ext ruby-mode yasnippet)) (let ((not-installed (loop for package in my-package-list when (not (package-installed-p package)) collect package))) (when not-installed (package-refresh-contents) (dolist (package not-installed) (package-install package)))) ;; init loader (require 'init-loader) (custom-set-variables '(init-loader-show-log-after-init nil)) (init-loader-load) ;; after init (add-hook 'after-init-hook (lambda () ;; split window (split-window-horizontally) ;; show init time (message "init time: %.3f sec" (float-time (time-subtract after-init-time before-init-time)))))
dotfiles/init.el at 416f7b23ed2cb8de40d4b04644491f81728e9dbb · sugyan/dotfiles · GitHub
auto-installãel-getãªã©ã使ãããæ¨æºã®package.elã®ã¿ã§è³ãã
èµ·åæã«å¿
è¦ãªpackageããã§ãã¯ããinstallããã¦ããªãå ´åã®ã¿elpaããinstallã
ãã®ä»ã®å種è¨å®ã¯init-loader
ã使ã£ã¦~/.emacs.d/inits
以ä¸ã«ã
init-loader.el と package.el を導入して快適 Emacs ライフ - Qiita ãåèã«ãã¦ãã¾ãã
anythingããhelmã¸ã®ç§»è¡
ãã£ã¨anything ã使ã£ã¦ãã¦ãããã©ããããããhelm ã«ç§»è¡ããããã¨ãããã¨ã§ ããããã
package-installãããã®ã使ãã¤ã¤ãèªåãªãã®è¨å®ã¯ãããªãããã§ã
;;; helm ;; (package-install 'helm) (require 'helm) ;; customize (progn (require 'helm-ls-git) (custom-set-variables '(helm-truncate-lines t) '(helm-buffer-max-length 35) '(helm-delete-minibuffer-contents-from-point t) '(helm-ff-skip-boring-files t) '(helm-boring-file-regexp-list '("~$" "\\.elc$")) '(helm-ls-git-show-abs-or-relative 'relative) '(helm-mini-default-sources '(helm-source-buffers-list helm-source-ls-git helm-source-recentf helm-source-buffer-not-found)))) ;; set helm-command-prefix-key to "C-z" (progn (require 'helm-config) (global-unset-key (kbd "C-z")) (custom-set-variables '(helm-command-prefix-key "C-z"))) ;; key settings (global-set-key (kbd "C-q") 'helm-mini) (global-set-key (kbd "M-x") 'helm-M-x) (global-set-key (kbd "M-y") 'helm-show-kill-ring) (global-set-key (kbd "C-x C-f") 'helm-find-files) (global-set-key (kbd "C-x C-b") 'helm-buffers-list) (define-key helm-command-map (kbd "d") 'helm-descbinds) (define-key helm-command-map (kbd "g") 'helm-ag) (define-key helm-command-map (kbd "o") 'helm-occur) (define-key helm-command-map (kbd "y") 'yas/insert-snippet) (define-key helm-command-map (kbd "M-/") 'helm-dabbrev) (define-key helm-map (kbd "C-h") 'delete-backward-char) (eval-after-load "helm-files" '(progn (define-key helm-find-files-map (kbd "C-h") 'helm-ff-backspace) (define-key helm-find-files-map (kbd "C-i") 'helm-execute-persistent-action)))
dotfiles/11-helm.el at 416f7b23ed2cb8de40d4b04644491f81728e9dbb · sugyan/dotfiles · GitHub
ä¸çªãã使ãhelm-mini
ããglobal-set-keyã§C-q
ã«å²ãå½ã¦ããã®ä»ã®ãã®ã¨ãã¦C-z
ãhelm-command-prefix-keyã«ãM-x
ãC-x C-f
ãªã©ã¯å
ã®ãã®ã¨å®å
¨ã«ç½®ãæãã
æ¤ç´¢ã«ã¯helm-occurã®ä»ãhelm-ag ã使ããã¦ããã ãã¦ãã¾ãã<helm-command-map>-i
ã§ä½¿ããhelm-semantic-or-imenuã¨ããããã便å©ã
ãã®ä»helmã«é¢ããåcustomizeã¨ãã¦ã¯ãcandidatesãç¡é§ã«æ¹è¡ããªãããã«helm-truncate-linesãtã«ããããC-k
ã§minibufferãã¯ãªã¢ãããªãããã«helm-delete-minibuffer-contents-from-pointãtã«ããããminibufferã§C-h
ã§ã®delete-backward-charãå¹ããªãã®ã¯æãå¾ãªãã®ã§å½ç¶ã®ããã«ä¸æ¸ãããªã©ãªã©ã
helm-ls-git
ãå
¥ãã¦helm-mini-default-sourcesã«å ãã¦ããã®ã¯ããªã«ãã«ããã便å©ã
ã§ããã¨å°ã£ãã®ã¯ä»ã¾ã§ãã£ã¨ä½¿ã£ã¦ãã¦ããperl-completion ãanythingä¾åã®ãã使ããªããã¨ãããã¨ãã¾ããã¨ãã¨ããã¾ã§ãã´ã£ã«ä½¿ã£ã¦ãã¦ããªãã£ãããã¨ããããã¯ç¡ãã§å¤§ä¸å¤«ããªãã¨ãããã¥ã¡ã³ãã¯ã²ãããã®ã§helm-perldoc ã使ã£ã¦ã¿ãããã¨æ¤è¨ãã¦ããããã¾ãã
ãã®ä»ã¯æåã¯å¤å°éåæãã£ããã®ãæ
£ãã¦ã ãã¶é¦´æãã§ãã¦ããã
ããããªã¹ã¹ã¡ï¼ããªã©ããã°æãã¦ããã ãããã§ãã