博客首页
注册
建议与交流
排行榜
加入友情链接
推荐
投诉
搜索:
帮助
jiushen
jiushen.cublog.cn
管理博客
发表文章
留言
收藏夹
博客圈
音乐
相册
文章
· emacs
· linux
· house
· japanese
· c++
· network programming
· tcp/ip
· c
· mvs
首页
关于作者
||
<<
>>
||
我的分类
文章列表 - emacs
emacs代码缩进的配置
emacs代码缩进的配置<br><br>(setq indent-tabs-mode nil)<br>(setq default-tab-width 4)<br>(setq tab-width 4)<br>(setq tab-stop-list '(4 8 12 16 20 24 28 32 36 40<br> 44 48 52 56 60 64 68 72 76 80 84 88 92 96)) <br><br>(defconst my-c-style<br> '((c-tab-always-indent . t)<br> (c-comment-only-line-offset . 4)<br> (c-hanging-braces-alist . ((substatement-open after)……
查看全文
发表于:2008-06-20 ┆
阅读(141)
┆
评论(0)
Why Should You Use GNU Emacs Instead of Vi?
<DIV> <OL> <LI>GNU Emacs comes with a complete manual available online with a hypertext viewing facility. <LI>GNU Emacs has numerous other help facilities: a tutorial; commands to describe functions, variables, keybindings, major modes; commands to look up commands, functions, and variables by patterns in their names. <LI>GNU Emacs does multiple windows even on dumb terminals. You can look at many different places in one file in different windows. You can split the screen horizontally or v……
查看全文
发表于:2008-05-27 ┆
阅读(206)
┆
评论(1)
GDB跳出循环和跳出函数
<DIV> <P>跳出循环:<BR>until NUM 执行到一个比当前行号大的行,或者也可以指定在当前frame(我理解成函数)中的某一行</P> <P>跳出函数:<BR>finish 执行,直到选定的frame执行结束,然后打印返回值,将其放入历史值中,停止</P></DIV>
查看全文
发表于:2008-05-21 ┆
阅读(178)
┆
评论(0)
关于emacs图形界面
<DIV>默认编译emacs,系统必须有libx11开发库,如果没有libx11的话,是不能用图形界面的,如果不能用图形界面就不能把图形界面开到远程客户端的xserver上来,也不能用鼠标滚轮.</DIV>
查看全文
发表于:2008-05-14 ┆
阅读(314)
┆
评论(0)
我最喜欢的emacs的c-mode的style
<DIV>;; set c basic offset<BR>(defun linux-c-mode () <BR>;"C mode with adjusted defaults for use with the Linux kernel." <BR>(interactive) <BR>(c-mode) <BR>(c-set-style "K&R") <BR>(setq c-basic-offset 8)) </DIV> <DIV> </DIV> <DIV>(setq auto-mode-alist<BR> (append '(("<A href="file://\\.h$">\\.h$</A>" . linux-c-mode)<BR> ("<A href="file://\\.c$……
查看全文
发表于:2008-02-29 ┆
阅读(202)
┆
评论(0)
Emacs CVS customization
<DIV> <DIV><SPAN style="COLOR: rgb(0,0,255)">1. 当然,先用命令行 check out 出源码拷贝</SPAN><BR><BR><SPAN style="COLOR: rgb(0,0,255)"> $ cd ~/work</SPAN><BR><SPAN style="COLOR: rgb(0,0,255)"> $ cvs -d :pserver:user@host:/path/to/repository co MODULE</SPAN><BR><BR><SPAN style="COLOR: rgb(0,0,255)">2. 从 Emacs 开始</SPAN><BR><BR><SPAN style="COLOR: rgb(0,0,255)"> 几个命令都可以进入 PCL-CVS 中,例如用 cvs-examine:</SPAN><BR><……
查看全文
发表于:2008-02-20 ┆
阅读(215)
┆
评论(0)
Using Anthy with Emacs
<DIV> <DIV> <UL> <LI><A href="http://anthy.sourceforge.jp/cgi-bin/hikien/hiki.cgi?Using+Anthy+with+Emacs#l0"><FONT color=#606420>anthy.el</FONT></A> <UL> <LI><A href="http://anthy.sourceforge.jp/cgi-bin/hikien/hiki.cgi?Using+Anthy+with+Emacs#l1"><FONT color=#606420>Setup (~/.emacs)</FONT></A> <LI><A href="http://anthy.sourceforge.jp/cgi-bin/hikien/hiki.cgi?Using+Anthy+with+Emacs#l2"><FONT color=#606420>How to use anthy.el</FONT></A> <LI><A href="http://anthy.sourceforge.jp/cgi-bin/hiki……
查看全文
发表于:2008-01-30 ┆
阅读(200)
┆
评论(0)
Programming in Emacs+Sematic
<DIV> <H2>C 程序 </H2> <H3>怎样在没有生成 TAGS 文件的时候在程序里跳转到某一个函数?</H3> <P>使用 imenu 或者 senator. 推荐使用 senator, 因为它来自 sematic,一个可以分析很多种语言文法的东西,你可以使用 C-c , j 跳转到文件里任何的函数或者变量。输入函数时按 TAB 可以补全函数名。看看<A href="http://docs.huihoo.com/homepage/shredderyin/images/senator-jump.png"><FONT color=#0000ff>这幅图</FONT></A>。 </P> <P>imenu 在 semantic 加强后可以在 project 内的函数变量间跳转。看<A href="http://docs.huihoo.com/……
查看全文
发表于:2008-01-28 ┆
阅读(305)
┆
评论(0)
Emacs Parenthesis
<DIV> <H2>Parenthesis</H2> <P>Emacs 中的 <EM>parenthesis</EM> (括号) 通常指那些能够组成一对的符号, 比如: </P> <DL> <DT>parenthesis <DD><EM>(</EM>, <EM>)</EM> <DT>braces <DD><EM>{</EM>, <EM>}</EM> <DT>brackets <DD><EM>[</EM>, <EM>]</EM> </DD></DL> <P>... </P> <P>在一个 <EM>Major Mode</EM> 中, 那些有意义的 parenthesis 由这个 mode 的 syntax(语法) 决定. </P> <P><EM>Note1:</EM> You can use `M-x check-parens' to find any unbalanced parentheses and unbalanced string quotes in the buffe……
查看全文
发表于:2007-12-17 ┆
阅读(300)
┆
评论(1)
在cygwin下安装字体并设置emacs的字体
<DIV>Duong Dang wrote:<BR><BR>> I am working a project in cygwin. I must install some VietNam font but<BR>> I don't know how. could you help me?<BR><BR>Is it a ttf font? copy it to /usr/X11R6/lib/X11/fonts/TTF and run font-update.<BR>That should be all.<BR></DIV> <DIV>再用命令xlsfonts查看是否字体已经安装,比如查看名字中含有simsun的字体</DIV> <DIV>xlsfonts -display 16.157.63.8:0 -l -fn "*"simsun"*"</DIV> <DIV> </DIV> <DIV>在.emacs里加入如下配置脚本</DIV> <DIV> </DIV> <DIV>;(c……
查看全文
发表于:2007-12-11 ┆
阅读(171)
┆
评论(0)
emacs另一个显示日文EUC的方法
<DIV>把.emacs里的euc-jp的设置注释掉</DIV> <DIV>在shell下</DIV> <DIV>export LC_ALL=ja_JP.utf8</DIV> <DIV>emacs</DIV> <DIV>就行了</DIV> <DIV>原因还没时间分析</DIV>
查看全文
发表于:2007-12-03 ┆
阅读(147)
┆
评论(0)
在windows环境下使用emacs + cscope + ecb替代source insight
<DIV>source insight是windows环境下用于代码开发和阅读的利器,功能强大,对于大规模代码的维护和开发几乎不可或缺(这里<BR>指它提供的功能,类似的商业工具还有很多)。使用emacs替代source insight原因有:a,si是商业软件,使用需要付费,虽然可以从网上<BR>找到破解版本;b,对于unix/linux爱好者或者需要同时工作于unix和windows环境下的开发人员,emacs是通用工具;emacs其它的强大<BR>功能暂且不表。<BR>下面是基于windows xp平台的安装方法,其中大部分步骤和unix环境下的一样,只有cscope的有所不同。<BR><BR>1)准备工作<BR>首……
查看全文
发表于:2007-11-29 ┆
阅读(847)
┆
评论(0)
设置ecb的默认source路径
<DIV>默认ecb打开的时候没有指定任何目录,</DIV> <DIV>可以点ecb->preferences->Directories</DIV> <DIV>在Ecb Source Path里设置Path和Alias,</DIV> <DIV>这样打开ecb的时候可以默认就打开你的source目录</DIV> <DIV> </DIV> <DIV>感觉现在用鼠标才能提高效率,emacs配合鼠标操作才能真正提高效率.</DIV> <DIV>用了图形界面以后就是不同了.</DIV>
查看全文
发表于:2007-11-21 ┆
阅读(136)
┆
评论(0)
利用xserver在本地显示服务器的xwindow界面
<DIV>一直都是用putty连上服务器,然后在字符界面下操作,</DIV> <DIV>虽然也可以用鼠标,但总感觉用emacs的时候很不方便,</DIV> <DIV>一直在想,要是能在本地用图形界面操作服务器的emacs就好了,</DIV> <DIV>这两天和公司的大牛坐在一起,才知道原来有xserver这个东东,</DIV> <DIV>可以将linux的xwindow映射到自己的桌面上.</DIV> <DIV> </DIV> <DIV>我是用cygwin带的cygwin/x作xserver的</DIV> <DIV>首先在安装cygwin的时候要选择X11,设为install</DIV> <DIV>安装完成后打开cygwin的bash,运行startxwin.sh</DIV> <DIV>注意,默认……
查看全文
发表于:2007-11-21 ┆
阅读(221)
┆
评论(1)
设置允许鼠标滚屏
<DIV>;;set mouse-wheel-mode on<BR> (mouse-wheel-mode t)</DIV>
查看全文
发表于:2007-11-20 ┆
阅读(127)
┆
评论(0)
设置dired模式使鼠标点击文件在当前buffer中打开
<DIV>dired模式下,当鼠标点击一个文件或者目录时,调用的是dired-mouse-find-file-other-window,这感觉很别扭,很不方便</DIV> <DIV> </DIV> <DIV>参考了/usr/local/share/emacs/22.1/lisp下面的dired.el.gz文件</DIV> <DIV> </DIV> <DIV>修改dired-mouse-find-file-other-window函数里的两行,将下面的代码添加到.emacs里,即实现了在当前buffer中打开该文件或目录</DIV> <DIV> </DIV> <DIV>---------------------------------------------------------------</DIV> <DIV>(defun dired-mouse-find-file (event)<BR>&nb……
查看全文
发表于:2007-11-20 ┆
阅读(134)
┆
评论(0)
在 Emacs 里面使用 Cscope
简介<BR><BR>对于浏览源代码来说,在 Emacs 里面也有很多工具可用,比如自带的 etags 就 不错,不过功能不如 Cscope 强大。 Cscope 并不像 etags 那样属于 Emacs , 它是一个独立的程序。它是一个具有完全 Unix 血统的程序,用于帮助开发人员 浏览源代码。它最初(那还是 PDP-11 的时代)是由 Bell 实验室开发,并且多年 以来一直是 AT&T Unix 商业发行版的一部分。它已经被用于管理超过两千万行代 码的工程。在2000年4月,多亏了 Santa Cruz Operation, Inc. (SCO) , Cscope 的源代码在 BSD license 下开放了源代码。<BR><BR>Cscope 的……
查看全文
发表于:2007-11-09 ┆
阅读(198)
┆
评论(0)
我自己的windows下的emacs配置文件
<table style="border-collapse: collapse;" align="center" border="1" bordercolor="#dddddd" cellpadding="0" cellspacing="0" width="360"> <tbody><tr height="60"><td align="center" width="60"><img src="/fileicon/zip.gif" alt="" border="0"></td><td> <table style="border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0" width="100%"> <tbody><tr height="20"><td align="center" width="40">文件:</td><td>_emacs.zip</td></tr> <tr height="20"><td align="center" width="40">大小:</td><td>0……
查看全文
发表于:2007-10-14 ┆
阅读(392)
┆
评论(0)
去掉Emacs和gnus启动时的引导界面
;;去掉Emacs和gnus启动时的引导界面<br>(setq inhibit-startup-message t)<br>(setq gnus-inhibit-startup-message t)
查看全文
发表于:2007-10-10 ┆
阅读(163)
┆
评论(0)
Understanding GNU Emacs and Tabs
<p>By Eric Pement (<a href="mailto:pemente@northpark.edu">pemente@northpark.edu</a>) <br> Last updated: November 13, 2006</p> <p>I love Emacs, but getting my head around how it handled <a href="http://www.student.northpark.edu/pemente/emacs_tabs.htm#eightchars" onmouseover="stm(Text[0],Style[0])" onmouseout="htm()">TABs</a> and how to make it do what I wanted it to do, was a major source of frustration. I spent several hours trying to figure it out, reading, searching and even grepping……
查看全文
发表于:2007-09-28 ┆
阅读(164)
┆
评论(0)