Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > Linux > 我的emacs配置文件
【标  题】:我的emacs配置文件
【关键字】:emacs
【来  源】:http://www.cublog.cn/u/19590/showart.php?id=195743

我的emacs配置文件

Your Ad Here ;; .emacs

;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)

;; turn on font-lock mode
;sq (when (fboundp 'global-font-lock-mode)
 ;sq (global-font-lock-mode t))

;; enable visual feedback on selections
;(setq transient-mark-mode t)

;; default to better frame titles
 ;sq(setq frame-title-format
   ;sq   (concat  "%b - emacs@" system-name))

;; -*-Emacs-Lisp-*-

;; This file is designed to be re-evaled; use the variable first-time
;; to avoid any problems with this.

;; font set
;(require 'cscope) ;;加载cscope
(require 'cedet) ;;加载cedet
(require 'ecb) ;;加载ecb
(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)
  ;;按键定义
  (define-key c-mode-base-map [(control \`)] 'hs-toggle-hiding)
  (define-key c-mode-base-map [(return)] 'newline-and-indent)
  (define-key c-mode-base-map [(f7)] 'compile)
  (define-key c-mode-base-map [(meta \`)] 'c-indent-command)
  (define-key c-mode-base-map [(tab)] 'hippie-expand)
  (define-key c-mode-base-map [(tab)] 'my-indent-or-complete)
  (define-key c-mode-base-map [(meta ?/)] 'semantic-ia-complete-symbol-menu)



(semantic-load-enable-code-helpers)

(setq c-macro-shrink-window-flag t)
  (setq c-macro-preprocessor "cpp")
  (setq c-macro-cppflags " ")
  (setq c-macro-prompt-flag t)
  (setq hs-minor-mode t)
  (setq abbrev-mode t)
)
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

;;;;我的C++语言编辑策略
(defun my-c++-mode-hook()
  (setq tab-width 4 indent-tabs-mode nil)
  (c-set-style "stroustrup")
 (define-key c++-mode-map [f3] 'replace-regexp)
)

(setq semanticdb-project-roots
      (list
        (expand-file-name "/")))

(defun my-indent-or-complete ()
   (interactive)
   (if (looking-at "\\>")
       (hippie-expand nil)
       (indent-for-tab-command))
 )

(global-set-key [(control tab)] 'my-indent-or-complete)


(autoload 'senator-try-expand-semantic "senator")

(setq hippie-expand-try-functions-list
       '(
        senator-try-expand-semantic
        try-expand-dabbrev
        try-expand-dabbrev-visible
        try-expand-dabbrev-all-buffers
        try-expand-dabbrev-from-kill
        try-expand-list
        try-expand-list-all-buffers
        try-expand-line
        try-expand-line-all-buffers
        try-complete-file-name-partially
        try-complete-file-name
        try-expand-whole-kill
        )
)

(set-face-background 'default "LightCyan3") ;;设置背景色为 浅青色3
(global-set-key [(f5)] 'speedbar)
(global-set-key [f12] 'ecb-activate) ;;定义F12键为激活ecb
(global-set-key [C-f12] 'ecb-deactivate) ;;定义Ctrl+F12为停止ecb
(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(ecb-options-version "2.32"))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

Debian的init进程初始化工作原理:【上一篇】
bootsect.S分析:【下一篇】
【相关文章】
  • emacs 操作及其它
  • emacs是伟大的
  • Emacs 基本编辑键列表
  • Emacs常用快捷键
  • 一个比较好中文说明的emacs配置文件
  • Emacs Tips
  • Emacs 配置文件
  • Fedora Core 5 下编译安装 Emacs 23
  • 关于emacs21设置问题
  • 类似紫光的emacs输入法
  • 【随机文章】
  • JAVA学习流程
  • 浅谈Spring + Hibernate在持久层的Session应用
  • 制作 openbsd 自启动安装光盘(图解说明)
  • asp.net 的菜单制作(asp.net 的菜单application)
  • 实现 iSCSI Target的两种方法
  • 充分条件、必要条件、充要条件
  • PHOTOSHOP制作NOKIA7650
  • 三色交替的下拉列表框
  • VS 2005 关于编译命令\EHsc的设置
  • Horizon Occlusion Culling
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.