📄 00000010.htm
字号:
<HTML><HEAD> <TITLE>BBS水木清华站∶精华区</TITLE></HEAD><BODY><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER>发信人: ggp (龙王÷ ), 信区: Linux <BR>标 题: Re: 新手上路之笨问 -- Emacs <BR>发信站: BBS 水木清华站 (Wed Oct 13 14:42:35 1999) <BR> <BR>【 在 mydoggy (MSN★191-2232776) 的大作中提到: 】 <BR>∶<I> 1 如何在emacs中设置C风格的自动缩进? </I><BR>∶<I> 2 如何更改tab的长度? </I><BR>∶<I> 3 如何改变x下emacs默认的字体和前、背景色? </I><BR>∶<I> THX~~ </I><BR> <BR>编辑 ~/.emacs <BR>加入 <BR>(defun my-c-mode-common-hook () <BR> ;; add my personal style and set it for the current buffer <BR> (c-set-style "bsd") <BR> ;; offset customizations not in my-c-style <BR> (c-set-offset 'member-init-intro '++) <BR> ;; other customizations <BR> (setq tab-width 4 <BR> ;; this will make sure spaces are used instead of tabs <BR> indent-tabs-mode nil) <BR> ;; we like auto-newline and hungry-delete <BR> (c-toggle-auto-hungry-state 1) <BR> (font-lock-mode 2) <BR> ;; keybindings for all supported languages. We can put these in <BR> ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map, <BR> ;; java-mode-map, and idl-mode-map inherit from it. <BR> (define-key c-mode-base-map "\C-m" 'newline-and-indent) <BR> ) <BR> <BR>(add-hook 'c-mode-common-hook 'my-c-mode-common-hook) <BR>(setq auto-mode-alist (cons '("\\.C$" . c++-mode) auto-mode-alist)) <BR> <BR>(setq auto-mode-alist (cons '("\\.cc$" . c++-mode) auto-mode-alist)) <BR> <BR>(setq auto-mode-alist (cons '("\\.c$" . c++-mode) auto-mode-alist)) <BR> <BR>(setq auto-mode-alist (cons '("\\.h$" . c++-mode) auto-mode-alist)) <BR> <BR>(setq auto-mode-alist (cons '("\\.cpp$" . c++-mode) auto-mode-alist)) <BR> <BR>(setq auto-mode-alist (cons '("\\.cxx$" . c++-mode) auto-mode-alist)) <BR>编辑 .Xdefaults 文件 <BR>emacs*Background: DarkSlateGray <BR>emacs*Foreground: Wheat <BR>emacs*pointerColor: Orchid <BR>emacs*cursorColor: Orchid <BR>emacs*bitmapIcon: on <BR>emacs*font: 8x16 <BR>emacs.geometry: 80x40 <BR>自己看着改吧, hehe <BR> <BR>-- <BR>※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 166.111.10.141] <BR><CENTER><H1>BBS水木清华站∶精华区</H1></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -