如何评价 Emacs 的如何读取配置文件件 Spacemacs

spacemacs子龙山人_spacemacs
以下内容已过滤百度推广
(spacemacs)a community-driven emacs distribution the best editor is neither emacs nor vim, it's emacs and vim!try online! ...&&普通
日&-&有的朋友使用了spacemacs但是没有发现什么神奇的效果,原因可能是没有将各种层的支持加入到.spacemacs里面。下面是方法:1. 打开~/.spacemacs2. 找到dotspacemacs-...&&普通
前几天,github 上的 spacemacs 已经成功的突破一万 star, 听说几个我非常佩服的 pythoner(比如『python web 开发实战』的作者董伟明) 也是非常喜欢 spacemacs, 我...&&普通
日&-&安装emacs最新版251 编辑emacs配置文件安装spacemacs spacemacs真正的启动还需要很多设置步骤 emacs和initel的区别1. 安装emacs最新版25.1步骤: 1. 下...&&普通
日&-&把官方 doc spacemacs/documentation.org 看一遍就行了如果是 vim user 的话,看这个也可以 spacemacs/vimusers.org 发布于
there are several methods of updating the core files and layer information for spacemacs. it is recommended to updat see the next ...&&普通
日&-&期间有个朋友推荐使用 spacemacs,他自己使用了一段时间,感觉很不错。他同时使用emacs和vim,能够熟练切换两者的快捷键操作(别看了,纯屠,说的就是你!!)...&&普通
我说下spacemacs的优点比使用大神配置的优点吧,大神的配置你可以用,但有时候阅读了源码你也不知道为什么,遇到问题难解决,想要扩展也不方便,文档也是鸡肋。spacemacs...&&普通
15:53&&&&4977181
武汉space酒美女多不多
15:53&&&&6046234
我喜欢去space耍,以后大家一起组队去。
15:53&&&&2103643
求助,无路可走了spacemacs 安装包之后,重启包就被删除了,在线等,急!!!_emacs吧_百度贴吧
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&签到排名:今日本吧第个签到,本吧因你更精彩,明天继续来努力!
本吧签到人数:0成为超级会员,使用一键签到本月漏签0次!成为超级会员,赠送8张补签卡连续签到:天&&累计签到:天超级会员单次开通12个月以上,赠送连续签到卡3张
关注:2,110贴子:
spacemacs 安装包之后,重启包就被删除了,在线等,急!!!收藏
江苏盘锦天燃气模温机,一台省得让你怀疑人生的燃气锅炉
.spacemacs里有一个additional什么来着,把包名加到里面
登录百度帐号推荐应用spacemacs,是一个给vimer的Emacs。
spacemacs是一个专门给那些习惯vim的操作,同时又向往emacs的扩展能力的人。它非常适合我这种折腾过vim,配置过emacs的人,但同时也欢迎任何没有基础的新人使用。简单来说,它是一个开箱即用的Emacs!这对一个比很多人年龄都大的软件来说是一件极其不容易的事情。
由于笔者自己在linux平台,并没有windows平台的经验,所以在这里便不献丑了,期待各位补充。另外,windows平台真的需要么,斜眼瞅向了Visual Studio。
在*nix系统中,都不一定会默认安装了Emacs,就算安装了,也不一定是最新的版本。在这里,我强烈建议各位卸载掉系统自带的Emacs,因为你不知道系统给你安装的是个什么奇怪的存在,最遭心的,我碰见过只提供阉割版Emacs的linux发行版。
建议各位自己去emacs项目主页下载Emacs-24.5(本书写作时的最新版)极其以上版本,然后下载下来源码。至于Emacs的安装也非常简单,linux平台老三步。
./configure
sudo make install
什么?你没有make?没有GCC?缺少依赖?
请安装它们……
Spacemacs安装
前面说了,Spacemacs就是个Emacs的配置文件库,因此我们可以通过非常简单的方式安装它:
git clone /syl20bnr/spacemacs ~/.emacs.d
mv ~/.emacs ~/_emacs.backup
cd ~/.emacs.d
echo $(git describe --tags $(git rev-list --tags --max-count=1)) | xargs git checkout
其中,后三行是笔者加的,这里必须要吐槽一下的是,Spacemacs的master分支实际上是极其落后而且有错误的!其目前的release都是从develop分支上打的tag。
因此,一!定!不!要!用!主!分!支!
最后,之所以要加最后一行,这是笔者安装的时候的release的一个小bug,没有这个文件的话,emacs并不会顺利的完成初始化。
好了,配置文件我们已经搞定了,接下来,启动你的emacs,spacemacs会自动的去网上下载你需要的插件安装包。另外,能自备梯子的最好,因为你要下的东西不大,但是这个网络确实比较捉急。
为了让Spacemacs支持Rust,我们还需要一点小小的配置。首先,请参照,安装好你的racer。
在这里,强烈建议将racer的环境变量加入到系统变量中(通常他们在/etc/profile/里进行配置)并重新启动系统,因为真的有很多人直接点击emacs的图标启动它的,这样做很可能导致emacs并不继承自己的环境变量,这是很令人无奈的。
修改标准的Spacemacs配置。
Spacemacs文档中提供了一份标准的spacemacs,你可以将其加入到你自己的~/.spacemacs文件中。
这里,我们需要修改的是其关于自定义插件的部分:
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
(setq-default
; Base distribution to use. This is a layer contained in the directory
; `+distribution'. For now available distributions are `spacemacs-base'
; or `spacemacs'. (default 'spacemacs)
dotspacemacs-distribution 'spacemacs
; List of additional paths where to look for configuration layers.
; Paths must have a trailing slash (i.e. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
; List of configuration layers to load. If it is the symbol `all' instead
; of a list then all discovered layers will be installed.
dotspacemacs-configuration-layers
; ----------------------------------------------------------------
; Example of useful layers you may want to use right away.
; Uncomment some layer names and press &SPC f e R& (Vim style) or
; &M-m f e R& (Emacs style) to install them.
; ----------------------------------------------------------------
auto-completion
better-defaults
spell-checking
syntax-checking
version-control
; List of additional packages that will be installed without being
; wrapped in a layer. If you need some configuration for these
; packages then consider to create a layer, you can also put the
; configuration in `dotspacemacs/config'.
dotspacemacs-additional-packages '()
; A list of packages and/or extensions that will not be install and loaded.
dotspacemacs-excluded-packages '()
; If non-nil spacemacs will delete any orphan packages, i.e. packages that
; are declared in a layer which is not a member of
; the list `dotspacemacs-configuration-layers'. (default t)
dotspacemacs-delete-orphan-packages t))
;; 以下配置文件内容省略
注意dotspacemacs-configuration-layers的配置和标准配置文件的不同。
将配置文件保存,然后重启你的emacs,当然,我们也可以按SPC f e R来完成重载配置文件的目的,然后你会发现emacs会开始下一轮下载,稍等其完成。
在上一步中,我们已经完成了对Racer的环境变量的配置,所以,现在你的Spacemacs已经配置完成了!这种简便的配置形式,几乎能和Atom抗衡了。
如下,spacemacs默认提供了几种按键绑定,但是,笔者并不觉得这些很好用,还是更喜欢用命令行。
Key Binding
Description
~SPC m c c~
compile project with Cargo
~SPC m c t~
run tests with Cargo
~SPC m c d~
generate documentation with Cargo
~SPC m c x~
execute the project with Cargo
现在开始,我们可以打开一个Cargo项目,并且去使用它了。你会惊讶的发现racer/flycheck/company这三个插件配合在一起的时候是那么的和谐简单。如何评价 Emacs 的配置文件 Spacemacs? - 知乎693被浏览130900分享邀请回答11121 条评论分享收藏感谢收起

我要回帖

更多关于 如何创建配置文件 的文章

 

随机推荐