Ubuntu 中安装Steve Purcell的emacs配置的整个步骤
Ubuntu中Emacs和gitHub的配置
晚上的时候觉得有必要把Emacs好好的配置一下,在网上搜了下发现Steve Purcell这位大牛的配置非常的好于是决定拿来用下,在使用的过程中大概有三个大地方需要注意,首先需要注意的是这位大牛的Emacs版本大于23.1,第二个要注意的是需要安装gitHub才能把大牛的所有配置文件下载下来。
Emacs的安装
- 在Ubuntu的软件中心删除过低的Emacs版本,下载最新的Emacs。我这里下载的Emacs24。在网上搜的结果是有肯能上面那位大牛更新了不支持Emacs23了 索性就直接用Emacs24了
- 大牛的网址https://github.com/purcell/emacs.d
- Emacs24的下载网址http://mirror.bjtu.edu.cn/gnu/emacs/
- 剩下的缺什么直接sudo apt-get即可。
gitHub的安装
大牛的配置在gitHub上,虽然我不是大牛但之前也使用过gitHub。平时备份个程序还是很方便的但是今天配置又忘掉了所以 又重新从网上搜了一把首先需要你注册一个帐号然后按照以下步骤操作。
- 查看是否已经有了ssh密钥:cd ~/.ssh 如果没有密钥则不会有此文件夹,有则备份删除
- ssh-keygen -t rsa -C “你的邮箱地址(在这里特别说明下可以使用假的邮件名,gitHub不会去验证。为了安全你可以使用假的,但是假的容易忘)”然后会输入两次密码最后生成两个默认文件id_rsa id_rsa.pub
- 在github上添加ssh密钥,这要添加的是“d_rsa.pub”里面的公钥 “Account Settings” > Click “SSH Public Keys” > Click “Add another public key” 。
- 测试:ssh git@github.com
The authenticity of host ‘github.com (207.97.227.239)’ can’t be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘github.com,207.97.227.239′ (RSA) to the list of known hosts.
ERROR: Hi tekkub! You’ve successfully authenticated, but GitHub does not provide shell access
Connection to github.com closed.
- 然后按照
- Global setup:
- Set up git
- git config --global user.name "user_name"
- git config --global user.email ×××@×××.com
- Add your public key
- Next steps:
- mkdir project_name
- cd project_name
- git init
- touch README
- git add README
- git commit -m 'first commit'
- git remote add origin git@github.com:user_name/project_name.git
- git push -u origin master
- Existing Git Repo?
- cd existing_git_repo
- git remote add origin git@github.com:user_name/project_name.git
- git push -u origin master
- Importing a Subversion Repo?
- Click here
- When you're done:
- Continue 新建立的只需要执行到红字以前。
- 配置完并且能够连入gitHub后 执行以下命令git clone https://github.com/purcell/emacs.d.git ~/.emacs.d
- 必须执行这一步,要不然会出现在某些文件夹下为空的情况。这也是为什么必须安装gitHub的原因之前我直接从网站上下但是老是下不全所有的文件git submodule update --init
- 在site-lisp/html5-el下执行make relaxng。执行前首先确认cvs已经安装好。