ale*_*nco 7 emacs performance file
直接打开文件时它的速度很快,但是当我打开一个最近激活的文件时,在我的文件中添加以下行.emacs.
:
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
Run Code Online (Sandbox Code Playgroud)
打开大约需要2秒钟.
这是一种正常的行为,我能为此做点什么吗?
我用来打开最近文件的命令:
我的整个.emacs:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(tool-bar-mode nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:inherit nil :stipple nil :background "Grey15" :foreground "Grey" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 92 :width normal :foundry "outline" :family "Monaco")))))
;;colot theme plugin
(add-to-list 'load-path "~/.emacs.d/")
(require 'color-theme)
(eval-after-load "color-theme"
'(progn
(color-theme-initialize)
(color-theme-charcoal-black)))
;;YASnippets
(add-to-list 'load-path "~/.emacs.d/plugins/yasnippet-0.6.1c")
(require 'yasnippet) ;; not yasnippet-bundle
(yas/initialize)
(yas/load-directory "~/.emacs.d/plugins/yasnippet-0.6.1c/snippets")
;; disable splash screen and startup message
(setq inhibit-startup-message t)
;; set yasnippet no indent
(setq yas/indent-line 'none)
;; set the tab width
(setq default-tab-width 4)
(setq tab-width 4)
(setq c-basic-indent 4)
;; set open recent files
(require 'recentf)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
;; set line number
(global-linum-mode 1)
;; prevent emacs from making backup files
(setq make-backup-files nil)
;; same syntax hightlight for all languages
(global-font-lock-mode 1)
;; remove bold and underline
(mapc
(lambda (face)
(set-face-attribute face nil :weight 'normal :underline nil))
(face-list))
Run Code Online (Sandbox Code Playgroud)
Rém*_*émi 10
当远程主机消失时,我遇到了recentf和远程文件的问题.
(setq recentf-keep '(file-remote-p file-readable-p))
Run Code Online (Sandbox Code Playgroud)
可以解决您的问题(远程文件将保留而不进行测试,如果它们仍然存在).