Windows Emacs OmniSharp 配置.md

源于不想用Unity的monoDevelop,其实他的补全功能已经很强了,但是他的vi模式很差.
就是想用vim模式编辑Unity代码,并且能够提示.
尝试了Sublime Text的一些包,Vim的效果很好,但是Unity代码的提示功能不强.
后来想用Vim 的OmniSharp 插件,发现他居然支持Sublime Text 和Emacs. OmniSharpSublime 官方说只在Linix和OS X上测试了.
于是想尝试一下传说中的Emacs.

1. 下载

官网 http://www.gnu.org/software/emacs/
解压到 D:\emacs-24.3\

2. 绿色便携

Emacs Portable APP
Portable Emacs
Portable Emacs-onna-Stick – USB Geekiness

1. 最简单的方法:

在emacs/bin 目录,新建 runemacs.bat

set HOME=%CD%\..\..\config
:: CD表示Current Directory
runemacs

这样 .emacs.d 文件就存在config文件夹下面了

2. 放在U盘里的方法
  • Copy an emacs folder to the USB stick, just as if you were installing it – just an unzipping of the Gnu Emacs for Windows distribution (sorry – no idea if any of this works with XEmacs).
    解压zip班emacs到u盘中
  • Under the emacs folder, there should already be a site-lisp folder. In it, create a file called site-start.el, which will be run every time Emacs starts, before your .emacs.
    在emacs目录下应该有site-lisp文件夹,新建一个site-start.el文件,这个文件将在emacs启动时运行,并且在.emacs之前。(在 emacs-24.5-bin-i686-pc-mingw32 (目前最新版中), emacs-24.5-bin-i686-pc-mingw32\share\emacs\site-lisp)
  • Add this code to site-start.el…
    把下面的代码写到 site-start.el 中
(defvar %~dp0 (substring data-directory 0 3)) (defvar usb-home-dir (concat %~dp0 "emacs/home/"))
(setenv "HOME" usb-home-dir)
  • Create yourself a home folder in the root of the USB drive. Copy all your usual Emacs home stuff to there – your elisp folders, your .emacs, Plans folder if you’re using PlannerMode, etc.
    在u盘中创建 home 文件夹,复制你所有的 emacs home 配制到其中。

3. 配置


绿色版次步可省略
打开注册表,找到HKEY_LOCAL_MACHINE/SOFTWARE/GNU/Emacs(如果没有则手动添加项),在此项下添加字符串值,名称为HOME,值为D:\Program Files\emacs-24.3
这样做的目的是让Emacs识别home路径为emacs根目录,这样 .emacs 配置文件将出现在emacs根目录.如果不配置,配置文件将出现在c:\Documents and Settings\user\Application Data\.emacs
另一种方法是设置HOME环境变量,这个需要重启,所以我没设置.


关于配置文件位置的文章
Emacs配置文件——新手攻略

3.5 Where do I put my init file?

On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a dot. Some users prefer to continue using such a name, because Explorer cannot create a file with a name starting with a dot, even though the filesystem and most other programs can handle it. In Emacs 22 and later, the init file may also be called .emacs.d/init.el. Many of the other files that are created by lisp packages are now stored in the .emacs.d directory too, so this keeps all your Emacs related files in one place.

All the files mentioned above should go in your HOME directory. The HOME directory is determined by following the steps below:

If the environment variable HOME is set, use the directory

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值