(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. [图形学] B样条曲线 - 原理和C++实现的演示程序(附源码)

    http://blog.csdn.net/mahabharata_/article/details/71856907 大二的时候,曾受老师所托,用C++而不是OpenGL去写B样条曲线的教学程序.时隔 ...

  2. abstract、final和native几大注意点

    变量不能被defalut修饰 native修饰方法,native修饰的方法简单来说就是:一个Java方法调用了一个非Java代码的接口.定义navtive方法时,并不提供实现体,因为其实现体是用非Ja ...

  3. Vue源码之 diff Vnode

    其实现在这个还没看懂,只能是初步看一下 _update调用__patch__方法,如果prevVnode(也就是oldVnode),旧vnode和新vnode对比,如果没有,就vnode就是vm.$e ...

  4. JSP是一种语言

    JSP(全称Java Server Pages)是运行在服务端的语言. <%-- 注释 --%>:JSP注释,注释内容不会被发送至浏览器甚至不会被编译 <!-- 注释 -->: ...

  5. carthage和cocoapods

    http://www.jianshu.com/p/b5607b8b9348 http://www.jianshu.com/p/5ccde5f22a17 1.在brew install carthage ...

  6. 【Linux】【Kernel】一个简单的内核模块例子

    1.本地主机的参数 zhangjun@zhangjun-virtual-machine:~$ uname -a Linux zhangjun-virtual-machine 4.4.0-31-gene ...

  7. 国内第一本cbuilder开发web的宝典震撼登场(delphi也可参考)

    uniGUI入门到精通cBuilder版 众所周知,cbuilder和delphi是曾经风靡多年的强悍的万能的开发工具,岂奈大浪淘沙,B/S时代的到来让这对孪生兄弟隐姓埋名.然,无数风流人物依然对他们 ...

  8. MySQL最基本的概念梳理

    本文根据<MySQL必知必会>(Ben Forta著,2009)整理,基于MySQL4.1-5,可作为深入研究MySQL之前的漱口篇.(基本语句.正则表达式.联结.全文本搜索.增删改查.存 ...

  9. Linux三个网络监视器之《二》——nethogs

    当你想要快速了解谁占用了你的带宽时,Nethogs 是快速和容易的.以 root 身份运行,并指定要监听的接口.它显示了空闲的应用程序和进程号,以便如果你愿意的话,你可以杀死它. 1 1.在这个网址f ...

  10. python基础语法四

    函数的作用域: name = 'alex' def foo(): name = 'linhaifei' def bar(): name = "wupeiqi" def tt(): ...