2010-01-10 3 views
1

정상적인 형태 이맥스는 테마 변경, 플러그인 추가 및 구성 후 4 초 동안 지연되고 깜박입니다. (Vim에서는 이런 일이 일어나지 않습니다).테마 변경 및 일부 플러그인 추가시 Emacs 느린 시작

;; set tab width 

;; turn on tabs 
(setq indent-tabs-mode t) 
(setq-default indent-tabs-mode t) 

;; bind the tab key 
(global-set-key (kbd "TAB") 'self-insert-command) 

;; 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 yasnippet 

(add-to-list 'load-path "D:/Program Files/emacs-23.1/site-lisp/plugins/yasnippet-0.6.1c") 
(require 'yasnippet) 
(yas/initialize) 
(yas/load-directory "D:/Program Files/emacs-23.1/site-lisp/plugins/yasnippet-0.6.1c/snippets") 

;; set yasnippet dropdown prompt 

(setq yas/prompt-functions '(yas/dropdown-prompt)) 

;; set yasnippet no indent 

(setq yas/indent-line 'none) 

;; same syntax hightlight for all languages 

(global-font-lock-mode 1) 

;; remove bold 

(mapc 
    (lambda (face) 
     (when (eq (face-attribute face :weight) 'bold) 
     (set-face-attribute face nil :weight 'normal))) 
(face-list)) 

;; set color theme 

(require 'color-theme) 
(color-theme-initialize) 
(color-theme-charcoal-black) 

;; set line number 

(global-linum-mode 1) 

;; set the highlight current line minor mode 

;; in every buffer, the line which contains the cursor will be fully 
;; highlighted 

(global-hl-line-mode 1) 

;; prevent emacs from making backup files 

(setq make-backup-files nil) 

;; default 

    (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 "SystemWindow" :foreground "SystemWindowText" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 98 :width normal :foundry "outline" :family "Monaco"))))) 

내가이를 향상시킬 수 있습니다 : 여기

내 이맥스입니까?

답변

3

깜박임은 정상입니다. elisp 코드를 바이트 컴파일하여 속도를 향상시킬 수 있습니다. 이를 위해서는 M-x byte-compile-file을 입력하고 .emacs에 대한 경로를 입력 한 다음 바이트 컴파일되지 않은 모든 elisp 디렉토리 (아마도 yasnippet)에 대해 C-u 0 M-x byte-recompile-directory을 입력하십시오.

Emacs를 다시 시작하고 속도가 빨라 졌는지 확인하십시오. 여전히 느린 경우, 메시지에 이맥스 스위치를 시작한 후 버퍼와 형태로 메시지를 찾아

로드 C : \ foo는 \ bar.el (소스) ... 이

하면 일을 "(소스)"부분은 여기에 바이트 컴파일 C : \ foo 디렉토리도 있습니다.

.emacs를 변경할 때마다 다시 컴파일해야한다는 점을 기억하십시오.

+0

! Vim을 더 잘 사용합니다. 어쨌든 고마워. – alexchenco