;; el-get (add-to-list 'load-path "~/.emacs.d/el-get/el-get") (unless (require 'el-get nil 'noerror) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el") (goto-char (point-max)) (eval-print-last-sexp))) (add-to-list 'el-get-recipe-path "~/.emacs.d/el-get-user/recipes") ;; Simple package names (el-get-bundle yasnippet) (el-get-bundle color-moccur) (el-get-bundle markdown-mode) ;; clang complete (el-get-bundle company-mode) (add-hook 'after-init-hook 'global-company-mode) ;; powerfull complete (el-get-bundle helm) (global-set-key (kbd "M-X") 'helm-M-x) (global-set-key (kbd "C-x C-f") 'helm-find-files) (global-set-key (kbd "C-x C-b") 'helm-buffers-list) (helm-mode 1) ;; Locally defined recipe (el-get-bundle yaicomplete :url "https://github.com/tarao/elisp.git" :features yaicomplete) (el-get-bundle neotree) (global-set-key [f2] 'neotree-toggle) ;; project manager (el-get-bundle projectile) (projectile-global-mode 1) (setq projectile-enable-caching t) ;; (global-set-key [f5] 'projectile-find-file) ;; save history. (el-get-bundle session) (add-hook 'after-init-hook 'session-initialize) ;; With initialization code (el-get-bundle zenburn-theme :url "https://raw.githubusercontent.com/bbatsov/zenburn-emacs/master/zenburn-theme.el" (add-to-list 'custom-theme-load-path "~/.emacs.d/el-get/zenburn-theme") (load-theme 'zenburn t)) ;; mode bar theme (el-get-bundle powerline (powerline-default-theme)) ;; font (if (eq system-type 'darwin) (progn (set-language-environment 'UTF-8) (set-locale-environment "UTF-8") (set-default-font "Dejavu Mono 16") (if (and (fboundp 'daemonp) (daemonp)) (add-hook 'after-make-frame-functions (lambda (frame) (with-selected-frame frame (set-fontset-font "fontset-default" 'unicode "黑体 16")))) (set-fontset-font "fontset-default" 'unicode "黑体 16"))) ) ;; support clipboard (setq x-select-enable-clipboard t) ;; close backup ;; (setq make-backup-files nil) ;; auto fix windows (global-visual-line-mode 1) ;; view line number (global-linum-mode 1) ;; auto open latest open file. (desktop-save-mode 1) (global-set-key (kbd "C-x g d") 'desktop-change-dir)
上面是我的配置文件,我发现 emacs 启动超级慢,需要 30 秒甚至一分钟,但是如果断网的话则只需要几秒钟,这里哪个代码需要花这么多的网络时间,我实在想不明白了。
感谢 @introom 和 @ffffwh 确认是tramp的问题,在文件头部添加
(setq tramp-default-method "ssh") (setq tramp-ssh-controlmaster-options "-o COntrolMaster=auto -o COntrolPath='tramp.%%C' -o COntrolPersist=no")
后emacs又能秒开了!
1 jsonline 2016-06-06 22:06:05 +08:00 via Android ![]() 遇到过 某个插件要自动更新 两个方案 1 用二分法查 2 brew uninstall emacs; brew install vim |
![]() | 2 firemiles OP @jsonline 额,我打开 emacs 后试着全部更新了一遍插件,发现速度还可以, 10s 内能全部更新完毕,感觉光是自动更新不会慢到这种程度。有没有能查看所有插件加载时间的插件?我找不到这个功能的插件。 |
3 EAimTY 2016-06-06 22:14:45 +08:00 via Android ![]() 那就用 atom 吧(逃 |
![]() | 4 P233 2016-06-06 22:14:56 +08:00 ![]() 没用过 el-get ,要不要换 use-package 试试? |
![]() | 5 firemiles OP |
![]() | 6 shakespaces 2016-06-06 22:22:04 +08:00 via Android ![]() @jsonline 方法 2 我给 101 分,多出来的拿去骄傲 |
7 goofansu 2016-06-06 22:27:44 +08:00 via iPhone ![]() use-package 超好用,可以看我的 goofansu/.emacs.d |
![]() | 8 guoer 2016-06-06 22:32:12 +08:00 via iPhone ![]() alias emac=vim |
![]() | 10 P233 2016-06-06 22:35:19 +08:00 ![]() 不太最流行的插件管理是哪个,不过用了半年 use-package 感觉特痛快。 |
![]() |
12 lukertty 2016-06-06 22:42:01 +08:00 ![]() url-retrieve-synchronously 需要联网吧 |
![]() | 13 firemiles OP @goofansu @P233 说实话我用 emacs 算是新手, use-package 的语法确实精简,但是 el-get 的维护更活跃,语法也简单,轻易不想换啊。 @guoer @junnplus 其实我平时也是用 vim 的,但是最近想找个写笔记的,就选择了 emacs 的 org-mode ,用着感觉不错,弥补了 markdown 的很多不足,快捷键也很配合。 @lukertty 好像 (unless (require 'el-get nil 'noerror) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/dimitri/el-get/master/el-get-install.el") (goto-char (point-max)) (eval-print-last-sexp))) 这个特别费时间,不是只装一次吗,为什么每次都联网。 |
14 introom 2016-06-06 23:13:18 +08:00 via Android ![]() 因为 tramp 的问题。你用的一定是 24.5 |
16 introom 2016-06-07 00:12:39 +08:00 via Android 有,放狗吧 |
![]() | 17 ffffwh 2016-06-07 00:15:52 +08:00 ![]() 川普的问题。加上这个: (setq tramp-default-method "ssh") (setq tramp-ssh-controlmaster-options "-o COntrolMaster=auto -o COntrolPath='tramp.%%C' -o COntrolPersist=no") |
![]() | 18 theFool 2016-06-07 00:40:38 +08:00 ![]() emacs --daemon 开机启动 平时用 emacsclient 再安利下 spacemacs |
![]() | 19 firemiles OP |
![]() | 22 ts25504 2016-06-07 13:36:07 +08:00 用 vim 吧 |