为Windows安装Emacs Evil模式

4

我想在Windows中安装Emacs的Evil模式,但是我找不到任何相关文档。 Evil模式是否适用于Windows?如果是的话,如何安装?

2个回答

2
如果你想尝试evil模式,我建议你使用这里提供的优秀的引导程序:https://github.com/bling/emacs-evil-bootstrap
两种情况:
  1. If you don't have a .emacs or init.el file yet, simply copy the supplied init.el file into your emacs.d directory. Emacs will automatically load evil mode when you next open the program.
    (If you are running Windows, your emacs.d directory will probably be located at C:\Users\your-user-name\AppData\Roaming\.emacs.d.)

  2. If you already have a .emacs or init.el config file, open up the github init file and copy across the code it contains to your own config file (if you already have some of this code, or some code that does the same job, you don't have to repeat it):

    (require 'package)
    (add-to-list 'package-archives
                 '("melpa" . "http://melpa.milkbox.net/packages/") t)
    
    ;;; from purcell/emacs.d
    (defun require-package (package &optional min-version no-refresh)
      "Install given PACKAGE, optionally requiring MIN-VERSION.
    If NO-REFRESH is non-nil, the available package lists will not be
    re-downloaded in order to locate PACKAGE."
      (if (package-installed-p package min-version)
          t
        (if (or (assoc package package-archive-contents) no-refresh)
            (package-install package)
          (progn
            (package-refresh-contents)
            (require-package package min-version t)))))
    
    (package-initialize)
    
    (require-package 'evil)
    
    (setq evil-search-module 'evil-search
          evil-want-C-u-scroll t
          evil-want-C-w-in-emacs-state t)
    
    (require 'evil)
    (evil-mode t)
    

    Again, just follow these steps, and emacs will automatically load evil mode when you next open the program.


0

您可以通过ELPA安装它,或者将存储库克隆到本地目录中进行安装。在Windows上与任何其他操作系统没有区别。

您遇到了什么问题? 主页 上有简单的安装说明。


我无法连接到git仓库,所以我下载了tarball。我应该把提取出来的文件放在哪个目录下?Evil页面上只有Linux系统的说明。 - user1574319
1
把它放在任何你想要的地方,唯一的要求是将该目录添加到 load-path - Dmitry

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接