Emacs for Windows use Helm-ag

ag是一个CLI下的高速搜索工具,用起来很是顺手,Emacs中的helm-ag就是调用的它,是我在使用Emacs时最经常使用的功能之一。git

要在Windows下使用,须要Cygwin,我用的是babun,一个整合好了的环境。打开Shell,先安装依赖包:github

$pact install libpcre-devel
$pact install liblzma-devel

而后从Github克隆下来源码包:工具

$git clone https://github.com/ggreer/the_silver_searcher.git

以后开始编译:ui

$cd the_silver_searcher
$./build.sh

编译完成以后将ag.exe文件拷贝到Cygwin或babun的/bin/目录下,而后在.emacs中写入:code

;; if u use babun
(setq exec-path (cons "C:/babun/.babun/cygwin/bin" exec-path))
;; if u use cygwin
(setq exec-path (cons "C:/cygwin/bin" exec-path))

而后在Emacs里使用Package安装helm-ag,就能够在Emacs中使用了。get

相关文章
相关标签/搜索