(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. 用Qt制作的Android独立游戏《吃药了》公布

           一个多月的努力最终有了回报,我自己研究制作的独立游戏<吃药了>.最终在360应用商店上线了.        这一款游戏呢.使用的是Qt开发的.事实上开发这款简单的应用之前.我 ...

  2. 【jQuery】Deferred(延迟)对象

    本文针对jQuery-todolist项目中使用到的Deferred(延迟)对象进行具体分析 $.Deferred() 是一个构造函数,用来返回一个链式实用对象方法来注册多个回调,并且调用回调队列,传 ...

  3. 25、springboot与缓存整合Redis

    默认使用ConcurrentMapCacheManager 将数据保存在下面的Map中 docker: 安装Redis: 查看官方文档: 添加约束 <dependency> <gro ...

  4. 使用arcpy替换栅格数据异常

    使用arcpy替换mxd中的栅格图层数据源时,发现导出的图片异常. 修改代码把修改后的mxd保存后发现修改后的数据源不是我传入参数的数据源 比如我设置的参数是 “2019_3_2_2f8091e2d4 ...

  5. POJ 3762 The Bonus Salary!(最小K覆盖)

    POJ 3762 The Bonus Salary! 题目链接 题意:给定一些任务.每一个任务有一个时间,有k天.一个时间仅仅能运行一个任务,每一个任务有一个价值.问怎么安排能得到最多价值 思路:典型 ...

  6. DataGuard快照(snapshot)数据库

    在Dataguard中,可以将standby备库切换为snapshot快照数据库,在切换为snapshot数据库后,备库将置于可读写的模式.可用于模拟业务功能测试.在使用完成之后,可以将快照数据库切换 ...

  7. Kafka 部署指南-好久没有更新博客了

    最近到了一家新公司,很多全新技术栈要理解.每天都在看各类 English Offcial Document,我的宗旨是我既然看懂了,就写下来分享,这是第一篇. 基本需求: 1.已有 zookeeper ...

  8. python if-elif-else 结构判断输入值处于何种年龄段

    输入变量 age 的值,再编写一个 if-elif-else 结构,根据 age的值判断处于人生的哪个阶段.如果一个人的年龄小于 2岁,就打印一条消息,指出他是婴儿.如果一个人的年龄为 2(含)-4岁 ...

  9. Python -- Effective Python:编写高质量Python代码的59个有效方法

    第 1 章 用 Pythonic 方式来思考 第 1 条:确认自己所用的 Python 版本 python --version import sys print(sys.version_info) p ...

  10. ios中input输入无效

    项目中一个登陆界面的input在安卓下可以输入,iOS下无法输入,经查询为 设置了-webkit-user-select:none;将其改为-webkit-user-select:auto;修正. 参 ...