LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
123
返回列表 发新帖
楼主: PiPiDou

emacs真xxx的强大啊

[复制链接]
发表于 2005-12-31 08:30:53 | 显示全部楼层
当初想学来着,记了一些快捷键,后来几天没有用就都忘记了,就又用vi了,vi命令也没记住几个,哈哈,感觉还是习惯editplus
回复 支持 反对

使用道具 举报

发表于 2005-12-31 11:54:20 | 显示全部楼层
Emacs不是挺漂亮的吗?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回复 支持 反对

使用道具 举报

发表于 2005-12-31 12:05:09 | 显示全部楼层
Emacs不是挺漂亮的吗?
实在看不惯这种缩进格式!
回复 支持 反对

使用道具 举报

发表于 2005-12-31 17:12:00 | 显示全部楼层
Post by 高热
实在看不惯这种缩进格式!


缩进格式是可以改的,emacs 内嵌的有:

`gnu'
     Coding style blessed by the Free Software Foundation for C code in
     GNU programs.

`k&r'
     The classic Kernighan and Ritchie style for C code.

`bsd'
     Also known as "Allman style" after Eric Allman.

`whitesmith'
     Popularized by the examples that came with Whitesmiths C, an early
     commercial C compiler.

`stroustrup'
     The classic Stroustrup style for C++ code.

`ellemtel'
     Popular C++ coding standards as defined by "rogramming in C++,
     Rules and Recommendations," Erik Nyquist and Mats Henricson,
     Ellemtel(1).

`linux'
     C coding standard for Linux (the kernel).

`python'
     C coding standard for Python extension modules(2).

`java'
     The style for editing Java code.  Note that the default value for
     `c-default-style' installs this style when you enter `java-mode'.

`user'
     This is a special style for several reasons.  First, the CC Mode
     customizations you do by using either the Customization interface,
     or by writing `setq''s at the top level of your `.emacs' file,
     will be captured in the `user' style.  Also, all other styles
     implicitly inherit their settings from `user' style.  This means
     that for any styles you add via `c-add-style' (*note Adding
     Styles: you need only define the differences between your new
     style and `user' style.
回复 支持 反对

使用道具 举报

发表于 2005-12-31 17:18:42 | 显示全部楼层
弄好了,哈哈

  1. (add-hook 'c-mode-hook
  2.           '(lambda()
  3.              (c-set-style "k&r")))
  4. (add-hook 'c++-mode-hook
  5.           '(lambda()
  6.              (c-set-style "stroustrup")))
复制代码
回复 支持 反对

使用道具 举报

发表于 2005-12-31 19:11:55 | 显示全部楼层
Post by 高热
实在看不惯这种缩进格式!

嘿嘿!我开始也是一样的,开始都是用k&r缩进格式的,后来决定学一种风格,并一直坚持下去,免得自己的代码乱七八糟,手边又刚好只找到了gnu的手册,就决定就用这个了。习惯了还不错。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表