(defun my-c-mode-auto-pair()
(interactive)
(make-local-variable'skeleton-pair-alist)
(setq skeleton-pair-alist'(
(?\" _ "\"" >)
(?\' _ "\'" >)
(?\( _ ")" >)
(?\[ _ "]" >)
(?{ \n > _ \n ?} >)))
(setq skeleton-pair t)
(local-set-key(kbd"(")'skeleton-pair-insert-maybe)
(local-set-key(kbd"{")'skeleton-pair-insert-maybe)
(local-set-key(kbd"[")'skeleton-pair-insert-maybe)
(local-set-key(kbd"\"")'skeleton-pair-insert-maybe)
(local-set-key(kbd"\'")'skeleton-pair-insert-maybe)
)
(add-hook'c++-mode-hook'my-c-mode-auto-pair)
(add-hook'c-mode-hook'my-c-mode-auto-pair)
(column-number-mode t)
(global-linum-mode t)
(setq make-backup-files nil)
(setq auto-save-mode nil)
(show-paren-mode t)
(setq show-paren-style'parenthesis)
(setq inhibit-splash-screen t)
(defun my-compile()
(interactive)
(save-some-buffers t)
(let((file(file-name-nondirectory buffer-file-name)))
(compile (format "g++ %s -g -o %s" file (file-name-sans-extension file))))
(switch-to-buffer-other-window"*compilation*")
)
(global-set-key(kbd"RET")'newline-and-indent)
(global-set-key[f4]'other-window)
(global-set-key[f5]'my-compile)
(global-set-key[f6]'gdb)
(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.
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(show-paren-mode t))
(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.
) (add-to-list'load-path"~/OI/.emacs-23.1/site-lisp")
(require'color-theme)
(color-theme-initialize)
(color-theme-deep-blue)
(setq-default cursor-type 'bar)
(setq c-default-style
'((c++ . "awk")))

legend_noa 的 EMACS配置的更多相关文章

  1. emacs配置eslint 语法检查.找不到node解决

    使用emacs配置eslint 当调用语法检查时报错 Suspicious state from syntax checker javascript-eslint: Checker javascrip ...

  2. emacs配置详解及C/C++IDE全功能配置演示(附配置文件)

    我的emacs插件下载地址: http://pan.baidu.com/share/link?shareid=4196458904&uk=3708780105 说明: 1.为什么使用emacs ...

  3. 一些有用的 Emacs 配置(窗口快速切换、一键透明效果、任意位置删除整行等)

    本篇文章记录的是一些有用的 Emacs 配置,有些是自己原创,有些是借鉴别人(能记起来出处的我放了链接). 规定:C 代表 Ctrl,M 代表 Alt. 1.设置一次跳跃 n 行的快捷键 按 C-M- ...

  4. emacs 配置

    个人的Emacs配置,环境是archlinux,参考了不少网上资料,因为太多,就不一一列举了,在这里感谢那些作者的辛苦经验劳动. (custom-set-variables ;; custom-set ...

  5. 绝世emacs配置for Ubuntu

    反正过不了几天就要退役了,把emacs配置放出来造福(祸害)大众? 浓浓的OIER风格,除了方便打代码就没别的用处(F8并不这样认为?),只可惜windows下的弄丢了,只有Ubuntu下的. F1不 ...

  6. 存个emacs配置

    emacs配置 (global-set-key [f9] 'compile-file) (global-set-key [f10] 'gud-gdb) (global-set-key (kbd &qu ...

  7. emacs 配置.emacs

    emacs 配置.emacs (require 'package) (package-initialize) (add-to-list'package-archives '("melpa&q ...

  8. purcell的emacs配置中的自动补全功能开启

    标记一下,原文参看purcell的emacs配置中的自动补全功能开启 修改init-auto-complete.el文件 ;;(setq-default ac-expand-on-auto-compl ...

  9. 中国大陆无法访问Steve Purcell的emacs配置解决办法

    因为大陆网络问题,没办法访问Steve Purcell的emacs配置中的melpa.org,所以我们更改目录即可. 1.删除自己的配置. $ rm ~/.emacs $ rm -rf ~/.emac ...

随机推荐

  1. fastreport窗口重置(适用于属性、数据等窗口显示不出来)

    找到如下路径: C:/Users/账户名/AppData/Local/FastReport/FastReport.config 删除即可. 记得先退出使用FastReport的程序,再删除

  2. .net正则匹配

    char[] weixin = txtweixinhao.Text.Trim().ToCharArray(); for (int i = 0; i < weixin.Length; i++) i ...

  3. Spring Factory

    BeanFactory和FactoryBean均为接口: BeanFactory为IOC容器的创建提供了一个最底层的规范,主要方法包括contains(bean), getBean(class, be ...

  4. [Hadoop] 启动HDFS缺少服务

    启动Hadoop后使用JPS命令查看进程,发现只有NameNode和NodeManger. 原因:格式化两次namenode.导致namenode和datanode中的CID不一致. $ hadoop ...

  5. 四、fgets与fputs

    fgets 描述:从流中读取最多size个字符,遇到文件末尾或\n则停止读取,该函数会在读取到的字符最后加上\0. 原型:char *fgets(char *s, int size, FILE *st ...

  6. vuex数据持久化插件--指定持久化特定的值

    指定需要持久化的state,配置如下 import createPersistedState from "vuex-persistedstate" conststore = new ...

  7. 2018-4-25 html基础知识

    HTML 理解HTML元素以及构成 1.理解HTML元素以及构成 HTML是一种标记语言,是由一个一个的标记组成的,用于告诉浏览器怎么构建网页的.就像人体里面的DNA一样,控制着人体的组成.同时,也正 ...

  8. java中对类中成员的排序

    要求:编写一个程序.程序中定义一个类circle,其中有数据成员radius:创建一个有5个circle型元素的数组,其radius值分别为2.10.8.4.121.调用Arrays.sort()给这 ...

  9. input type file兼容性

    input  中的type  file类型  在ie10及以上还算正常,在ie9中你就找不到他在哪了 解决此类的问题就需要巧妙的运用的css   以及input 了 需要两个input配合来写,一个i ...

  10. 【解决】Server Tomcat v7.0 Server at localhost failed to start.

    Server Tomcat v7.0 Server at localhost failed to start. 出现此原因是因为servlet-name不匹配 修改一致即可