上次发现在注释里, 回车后, 行首不能自动添加 *
了. 像这样:
/*
* =====================================================================================
*
* Filename: word_segment.cpp
*
* Description:
*
* Version: 1.0
* Created: 2011-04-20 16:48:44
* Revision: none
* Compiler: gcc
*
* Author: xxyyzz (search engine group), [email protected]
* Company: www.example.com
*
* =====================================================================================
*/
当时忙, 也没有去纠结.
今天才发现, 原来很多文章在讲配置自动缩进时, 是这么说哒:
(define-key c-mode-base-map "\C-m" 'newline-and-indent)
在smth上看到XeCycle
同学说 'c-context-line-break
更好:
(define-key c-mode-base-map "\C-m" 'c-context-line-break)
(define-key c-mode-base-map [ret] 'c-context-line-break)
看'c-context-line-break
的文档后, 发现, 原来,这么配置后,我要的功能就回来了!
cool!