(global-set-key [f9] 'compile-file)
(global-set-key [f10] 'gud-gdb)
(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "C-a") 'mark-whole-buffer);;全选
(global-set-key (kbd "C-x a") 'indent-region);;格式化
(global-set-key (kbd "C-s") 'save-buffer);;保存
(global-set-key (kbd "C-d") 'doctor)
(global-set-key (kbd "RET") 'newline-and-indent)
;;模拟上下左右键
(global-set-key (kbd "C-i") 'previous-line)
(global-set-key (kbd "C-k") 'next-line)
(global-set-key (kbd "C-j") 'left-char)
(global-set-key (kbd "C-l") 'right-char)
(global-set-key (kbd "C-u") 'delete-backward-char)
(global-set-key (kbd "C-o") 'delete-char)
(global-set-key [tab] 'tab-to-tab-stop)
(global-set-key (kbd "C-q") 'kill-emacs)
(global-set-key (kbd "C-h") 'kill-this-buffer)
(setq c-basic-offset 4)
(global-linum-mode t)
(global-set-key (kbd "C-d") 'kill-whole-line)
(show-paren-mode t)
;;启动设置
(setq default-frame-alist
'((vertical-scroll-bars)
(top . 25)
(left . 45)
(width . 120)
(height . 40)
(background-color . "black")
(foreground-color . "white")
(cursor-color . "gold1")
(mouse-color . "gold1")
(tool-bar-lines . 0)
(menu-bar-lines . 1)
(scroll-bar-lines . 0)
(right-fringe)
(left-fringe)))

;; 设置另外一些颜色:语法高亮显示的背景和主题,区域选择的背景和主题,二次选择的背景和选择

(global-hl-line-mode 1)

(set-face-background 'highlight "black")
(set-face-foreground 'region "cyan")
(set-face-background 'region "blue")
(set-face-foreground 'secondary-selection "skyblue")
(set-face-background 'secondary-selection "darkblue")

(set-frame-parameter (selected-frame) 'alpha (list 85 50))

(add-to-list 'default-frame-alist (cons 'alpha (list 85 50)))

(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)
;;鼠标不用烦人地跳来跳去
(defun compile-file ()
(interactive)
(compile (format "g++ -o %s %s -g -lm -Wall" (file-name-sans-extension (buffer-name))(buffer-name))))

(setq-default cursor-type 'bar) ;; 设置光标为竖线

(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))
'(inhibit-startup-screen t)
'(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.
'(default ((t (:family "Ubuntu Mono" :foundry "DAMA" :slant normal :weight bold :height 181 :width normal)))))

存一下emacs配置的更多相关文章

  1. 存个emacs配置

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

  2. emacs配置&博客界面源代码

    emacs配置 如果想要考场简单配置也可以去下面看,需要别的考场配置可以自己在下面比较全的里面找 考试备忘录(有新的就会更的...) By Junlier (global-set-key [f9] ' ...

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

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

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

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

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

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

  6. emacs 配置

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

  7. 绝世emacs配置for Ubuntu

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

  8. emacs 配置.emacs

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

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

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

随机推荐

  1. VMware Harbor 学习

    Harbor简介 Harbor是一个用于存储和分发Docker镜像的企业级Registry服务器,通过添加一些企业必需的功能特性,例如安全.标识和管理等,扩展了开源Docker Distributio ...

  2. Java并发案例04---生产者消费者问题03--使用ReentrantLock

    /** * 面试题:写一个固定容量同步容器,拥有put和get方法,以及getCount方法, * 能够支持2个生产者线程以及10个消费者线程的阻塞调用 * * 使用wait和notify/notif ...

  3. No.7 - 使用 animate.css 实现一个优雅的登录框

    <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content ...

  4. 基于物理文件的HBase备份还原

    前提说明: 1.HBase数据分表,所以备份的粒度是表. 2.备份的内容为Azure的Blob存储. HBase Blob备份 备份时,需要先将表disable,以保持数据一致性. 备份的工具可以用A ...

  5. 解决Bug步骤

    1.看报错.将bug定位到文件.类.方法. 2.打断点.将bug定位到具体代码行号. 3.分析断点输出结果. 4.结合报错和断点结果,修改代码. 总之:拆解问题.定位问题.分析问题.解决问题.

  6. HDU 1165 公式推导题

    题目链接: acm.hdu.edu.cn/showproblem.php?pid=1165 Eddy's research II Time Limit: 4000/2000 MS (Java/Othe ...

  7. 与MySQL的零距离接触

    存储引擎 查看数据表的创建命令:show create table tbl_name

  8. statsvn,代码统计

    #! /bin/bash # 计算有效变更代码量的脚本 #./svnCount -thttps://192.168.1.1/xxx -s1000 -e2000 -uxxx -pxxx version( ...

  9. ListView的优化问题

    listview算是我们app中较为常用的控件之一了.而如何优化也是一个问题. listview的优化一般分为两类. 一布局优化. 对布局的优化是大家了解的. 1.复用convertview.andr ...

  10. vim内替换文件内容

    几个常用的方法如下: :%s/foo/bar/g 把全部foo替换为bar,全局替换 :s/foo/bar/g 当前行替换foo为bar :%s/foo/bar/gc 替换每个foo为bar,但需要确 ...