新的emacs用户。 我有一个简单的init.el文件,用于学习emacs配置。 我有自动完成工作,当我开始输入时,在init.el文件内部(全局,它会显示单词上的剩余部分并自动完成。
以后几次击键现在它不再自动完成了。根据谷歌我在init.el文件中有所有正确的关键字。花了近3个小时,没有运气。 有什么想法吗?
2;; led packages. Don't delete this line. If you don't want it,
3;; just comment it out by adding a semicolon to the start of the line.
4;; You may delete these explanatory comments.
5(package-initialize)
6
7(load-theme 'wombat)
8(setq frame-title-format "emacs")
9
10(menu-bar-mode -1)
11(tool-bar-mode -1)
12
13(scroll-bar-mode -1)
14(set-default 'cursor-type 'hbar)
15
16(column-number-mode)
17
18(show-paren-mode)
19
20(global-hl-line-mode)
21
22(winner-mode t)
23
24(windmove-default-keybindings)
25
26(require 'package)
27
28(add-to-list 'package-archives
29 '("melpa" . "http://melpa.milkbox.net/packages/")
30 t)
31
32(add-to-list 'package-archives
33 '("marmalade" . "http://marmalade-repo.org/packages/")
34 t)
35
36(package-initialize)
37
38(global-set-key (kbd "M-x") 'smex)
39
40(ido-mode t)
41
42(setq ido-enable-flex-matching t)
43
44(global-set-key (kbd "C-c C-c M-x") 'execute-extended-command)
45
46(ac-config-default)
47
48(nlinum-mode)
49
50(autopair-global-mode)
51
52(global-undo-tree-mode)
53
54(global-set-key (kbd "M-/") 'undo-tree-visualize)
55
56(global-set-key (kbd "C-M-z") 'Switch-Window)
57
58(global-set-key (kbd "C->") 'ace-jump-mode)
59(require 'auto-complete)
60(global-auto-complete-mode t)
61
62(require 'evil)
63(evil-mode 1)
64(define-key evil-normal-state-map (kbd "C-h") 'evil-window-left)
65(define-key evil-normal-state-map (kbd "C-j") 'evil-window-down)
66(define-key evil-normal-state-map (kbd "C-k") 'evil-window-up)
67(define-key evil-normal-state-map (kbd "C-l") 'evil-window-right)
答案 0 :(得分:0)
当我使用package-install安装软件包时,它会向init.el添加文本,这会导致问题。我删除了其他文本,删除了init.el内容并重新输入了所有内容。这次我没有使用包安装程序,它工作正常。