﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-Try-随笔分类-Linux</title><link>http://www.cppblog.com/loonsw/category/10087.html</link><description>Life, Algorithm, Mathematics, C/C++,  GNU/Linux, Traveling…</description><language>zh-cn</language><lastBuildDate>Fri, 03 Apr 2009 13:33:47 GMT</lastBuildDate><pubDate>Fri, 03 Apr 2009 13:33:47 GMT</pubDate><ttl>60</ttl><item><title>配置Emacs的一些总结</title><link>http://www.cppblog.com/loonsw/archive/2009/04/03/78868.html</link><dc:creator>redcode</dc:creator><author>redcode</author><pubDate>Fri, 03 Apr 2009 12:14:00 GMT</pubDate><guid>http://www.cppblog.com/loonsw/archive/2009/04/03/78868.html</guid><description><![CDATA[<span style="color: #040000; background-color: #ff0000;">首先</span>，对字体颜色进行配置:<br><br>1.简单设置方法：<br>通过命令快速打开背景颜色设定界面：<span style="display: none;">51Testing软件测试网6p{Uk[;K</span><br><br><span class="body">
<div style="border: 1px solid #cccccc; padding: 4px 5px 4px 4px; background-color: #eeeeee; font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: #000000;">M</span><span style="color: #000000;">-</span><span style="color: #000000;">x&nbsp;customize</span><span style="color: #000000;">-</span><span style="color: #000000;">face<br>default<br></span></div>
<span style="display: none;">J~B!R6hb|I`0</span><span style="display: none;">51Testing软件测试网.G"g	IWw</span><span style="display: none;">51Testing软件测试网D4q/}r:v1Y;?i2q <br><br></span><span style="display: none;">51Testing软件测试网d1w<br></span>Foreground color: grey85 <br><span style="display: none;">K]X0c	X"O0</span>background color: black</span><br><span style="display: none;">5N P+dN9GX4_`r;s</span><br>2.<span style="display: none;">)<br><br><br>&nbsp; </span>也可以安装一个软件包，里面包含了几十种已经定义好的颜色主题。<span style="display: none;">51Testing软件测试网:p:yC`Z�W</span><br>sudo apt-get install emacs-goodies-el<br><span style="display: none;">6f"mk%a&amp;g0</span><span style="display: none;">{c,hl#FU;t0</span><span style="background-color: #ffffff;"></span>键入<code><font face="新宋体">&#8216;M-x color-theme-select&#8217;</font></code>选择不同的主题;<br><span style="background-color: #ff0000;"><br>接下来</span>安装配置cc-mode：<br>下载后：<br>emacs -batch -no-site-file -q -f batch-byte-compile <span style="font-weight: bold;">cc</span>-*.el 来 byte-compile <br>新建一个emacs的文件夹：<br>mkdir ~/.emacsd<br>mv <strong style="color: black; background-color: #ffff66;"></strong><span style="background-color: #ffffff;"><span style="font-weight: bold;">cc</span>-<span style="font-weight: bold;">mode</span>-</span>5.31.3 ~/.emacsd<br><br>修改一下 ~/.emacs<br>加入<br><blockquote>(add-to-list 'load-path "~/.emacsd/cc-<span style="font-weight: bold;">mode</span>-5.31.3")</blockquote>新建一个test.cpp，M-x c-version<br>出现了 <span style="font-weight: bold;">Using CC Mode version 5.31.3</span>就表示安装成功了cc-mode;<br><br><span style="background-color: #ff0000;">然后</span>安装ecb和cedet：<br>下载出两个tar文件,mv到~/.emacsd下<br>tar zxvf ecb-2.32.tar.gz<br>tar zxvf cedet-1.0pre4.tar.gz<br><br>cd cedet-1.0pre4<br>make<br>等cedet生成完毕.<br><br>.emacs中添加下面一段.注意,load-file那一行的目录要自己改一下<br>;; Load CEDET<br>(load-file "你存放cedet的目录/common/cedet.el")<br>;;例如(load-file "~/.emacsd/cedet-1.0/common/cedet.el")<br><br>;; Enabling various SEMANTIC minor modes.&nbsp; See semantic/INSTALL for more ideas.<br>;; Select one of the following:<br><br>;; * This enables the database and idle reparse engines<br>;;(semantic-load-enable-minimum-features)<br><br>;; * This enables some tools useful for coding, such as summary mode<br>;;&nbsp;&nbsp; imenu support, and the semantic navigator<br>(semantic-load-enable-code-helpers)<br><br>;; * This enables even more coding tools such as the nascent intellisense mode<br>;;&nbsp;&nbsp; decoration mode, and stickyfunc mode (plus regular code helpers)<br>;; (semantic-load-enable-guady-code-helpers)<br><br>;; * This turns on which-func support (Plus all other code helpers)<br>;; (semantic-load-enable-excessive-code-helpers)<br><br>;; This turns on modes that aid in grammar writing and semantic tool<br>;; development.&nbsp; It does not enable any other features such as code<br>;; helpers above.<br>;; (semantic-load-enable-semantic-debugging-helpers)<br><br>这样cedet就装好了<br><br>接下来安装ecb<br>在.emacs里面加入<br><br>(add-to-list 'load-path "你放ecb的目录")<br>;;例如(add-to-list 'load-path "~/.emacsd/ecb-2.32")<br>(require 'ecb)<br><br>注意这个段要加在cedet配置的后面<br><br>重启emacs<br><br>在emacs中打开一个c或者c++文件.选tool中的Start Code Browser(ECB).<br><br>ecb和cedet功能丰富.具体请看M-x ecb-show-help 和cedet包里面的install文件.<br><br>    <img src ="http://www.cppblog.com/loonsw/aggbug/78868.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/loonsw/" target="_blank">redcode</a> 2009-04-03 20:14 <a href="http://www.cppblog.com/loonsw/archive/2009/04/03/78868.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>