emacs配置文件
来源:互联网 发布:php分页加跳转页面 编辑:程序博客网 时间:2024/05/17 21:06
我用的emacs配置文件,可以自动使用空格缩进,美中不足的是注释老是比代码多右移4个字符,一直改不出来。
.emacs代码
;;etq load-path (cons "~/.emacs.d" load-path));;(require 'color-theme);;(color-theme-initialize);;(color-theme-dark-blue);;(require 'cc-mode);;(c-set-offset 'inline-open 0);;(c-set-offset 'friend '-);;(c-set-offset 'substatement-open 0);;(defun my-c-mode-common-hook();; (setq tab-width 4 indent-tabs-mode nil) ;;; hungry-delete and auto-newline;; (c-toggle-auto-hungry-state 1);;(global-set-key [(ctrl g)] 'goto-line)(global-set-key "\C-g" 'goto-line)(setq indent-tabs-mode nil)(setq default-tab-width 4)(setq tab-width 4)(setq tab-stop-list ())(setq x 40)(while (> x 0) (setq tab-stop-list (cons (* x 4) tab-stop-list)) (setq x (1- x)));;(loop for x downfrom 40 to 1 step 1 do;; (setq tab-stop-list (cons (* x 4) tab-stop-list)))(defconst my-c-style '((c-tab-always-indent . t) (c-comment-only-line-offset . 4) (c-hanging-braces-alist . ((substatement-open after) (brace-list-open))) (c-hanging-colons-alist . ((member-init-intro before) (inher-intro) (case-label after) (label after) (access-label after))) (c-cleanup-list . (scope-operator empty-defun-braces defun-close-semi)) (c-offsets-alist . ((arglist-close . c-lineup-arglist) (substatement-open . 0) (case-label . 4) (block-open . 0) (knr-argdecl-intro . -))) (c-echo-syntactic-information-p . t) ) "My C Programming Style");; offset customizations not in my-c-style(setq c-offsets-alist '((member-init-intro . ++)));; Customizations for all modes in CC Mode.(defun my-c-mode-common-hook () ;; add my personal style and set it for the current buffer (c-add-style "PERSONAL" my-c-style t) ;; other customizations (setq tab-width 4 ;; this will make sure spaces are used instead of tabs indent-tabs-mode nil) ;; key bindings for all supported languages. We can put these in ;; c-mode-base-map because c-mode-map, c++-mode-map, objc-mode-map, ;; java-mode-map, idl-mode-map, and pike-mode-map inherit from it. (define-key c-mode-base-map "\C-m" 'c-context-line-break) )(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
0 0
- Emacs 配置文件
- emacs 配置文件
- emacs配置文件
- Emacs 配置文件
- emacs 配置文件
- Emacs 配置文件
- emacs配置文件
- emacs配置文件
- Emacs 配置文件
- emacs配置文件
- Emacs 配置文件
- emacs配置文件
- Emacs 配置文件
- emacs配置文件——.emacs
- 我的emacs配置文件
- emacs的配置文件
- emacs配置文件浅谈
- 我的 Emacs 配置文件
- 程序员实践过的算法和数据结构学习过程
- php时间戳与js时间戳的比较
- 邮箱开发(三) - MailCore2 详细使用
- DDMS中的Emulator Control呈现灰色不可用的原因及解决方法
- Linux 对文件名进行批量修改
- emacs配置文件
- pat 1049
- Jpush 点对点通知测试
- 响应式布局
- mysql查询缓存
- 从C++中传送多个数据(类似于结构体)进入QML的listView中
- 最近的工作
- VMware下安装ubuntu,桥接上网配置静态IP
- pku2253 记录从初始到终点最长的路径(某一部分),迪杰斯特拉求最短路