emacs配置
原配置
(global-set-key [f9] 'compile-file)
(global-set-key [f10] 'gud-gdb)
(global-set-key (kbd "C-z") 'undo)
(global-set-key (kbd "RET") 'newline-and-indent)
(global-linum-mode t)
(show-paren-mode t)
(define-key key-translation-map (kbd "C-d") (kbd "M-p M-y"))
(global-set-key (kbd "M-p M-y") 'kill-whole-line)
(define-key key-translation-map (kbd "C-a") (kbd "C-x h"))
(setq c-default-style "awk")
;;;考场必备
(ido-mode t)
(setq default-frame-alist
'((vertical-scroll-bars)
(top . 25)
(left . 45)
(width . 120)
(height . 40)
(background-color . "grey15")
(foreground-color . "grey")
(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 "gray5")
(set-face-foreground 'region "cyan")
(set-face-background 'region "blue")
(set-face-foreground 'secondary-selection "skyblue")
(set-face-background 'secondary-selection "darkblue")
;;;;;设置org模式
(setq org-startup-indented t)
;(setq org-log-done 'time)
;(s.etq org-log-done 'note)
;
;;;无关紧要
(set-cursor-color "wheat")
(set-mouse-color "wheat")
(global-font-lock-mode t);;高亮
;;;;;设置编译信息
(defun compile-file ()
(interactive)
(compile (format "g++ -o '%s' '%s' -g -lm -Wall" (file-name-sans-extension (buffer-name))(buffer-name))))
;;(global-set-key (kbd "<f9>") 'compile-file)
;;;;;设置一键调试
;;;;;改变emacs标题栏的标题
(setq frame-title-format "%b")
;;;;;允许emacs和外部其他程序的粘贴
(setq x-select-enable-clipboard t)
;; 显示列号
(setq column-number-mode t)
;;设置tab为2个空格的宽度
(setq default-tab-width 4)
(setq c-basic-offset 4)
;;;;;启用时间显示设置,在minibuffer上面的那个杠上(忘了叫什么来着)
(display-time-mode 1)
;;;;;时间使用24小时制
(setq display-time-24hr-format t)
;;;;;时间显示包括日期和具体时间
(setq display-time-day-and-date t)
;;;;;时间的变化频率,单位多少来着?
(setq display-time-interval 10)
;;;;;是用滚轴鼠标
(mouse-wheel-mode t)
;;;;;备份设置
;;;;;emacs还有一个自动保存功能,默认在~/.emacs.d/auto-save-list里,这个非常有用,我这里没有改动,具体可以参见Sams teach yourself emacs in 24hours(我简称为sams24)
;;;;;备份设置方法,直接拷贝
(setq backup-by-copying t)
;; 自动存盘
(setq auto-save-mode t)
;;;;;去掉烦人的警告铃声
(setq visible-bell nil)
(setq ring-bell-function 'ignore)
;;;;;指针不要闪,我得眼睛花了
(blink-cursor-mode -1)
;;;;;滚动页面时比较舒服,不要整页的滚动
(setq scroll-step 1
scroll-margin 3
scroll-conservatively 10000)
;;;;;设定删除保存记录为200,可以方便以后无限恢复
(setq kill-ring-max 200)
;;;;;修改透明度
(set-frame-parameter (selected-frame) 'alpha (list 85 50))
(add-to-list 'default-frame-alist (cons 'alpha (list 85 50)))
(setq-default cursor-type 'bar)
(show-paren-mode 1);;括号匹配
(fset 'yes-or-no-p 'y-or-n-p);;酱油的
(setq make-backup-files nil)
(global-auto-revert-mode t);自动reload文件
(global-set-key (kbd "<f8>") 'gdb-many-windows)
(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.
'(blink-cursor-mode nil)
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(display-time-mode t)
'(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 "unknown" :slant normal :weight normal :height 143 :width normal)))))
(auto-insert-mode) ;;; Adds hook to find-files-hook
(setq auto-insert-directory "~/.emacs.d/mytemplates/") ;;; Or use custom, *NOTE* Trailing slash important
(setq auto-insert-query nil) ;;; If you don't want to be prompted before insertion
(define-auto-insert "\." "moban.cpp")
这是考场配置
(setq default-tab-width 4)
(setq-default cursor-type 'bar)
(setq c-default-style "awk")
(set-frame-parameter (selected-frame) 'alpha (list 85 50))
(set-background-color "gray15")
(set-foreground-color "gray")
(global-set-key (kbd "RET") 'newline-and-indent)
(global-set-key (kbd "C-a") 'mark-whole-buffer)
(global-linum-mode t)
emacs配置的更多相关文章
- emacs配置eslint 语法检查.找不到node解决
使用emacs配置eslint 当调用语法检查时报错 Suspicious state from syntax checker javascript-eslint: Checker javascrip ...
- emacs配置详解及C/C++IDE全功能配置演示(附配置文件)
我的emacs插件下载地址: http://pan.baidu.com/share/link?shareid=4196458904&uk=3708780105 说明: 1.为什么使用emacs ...
- 一些有用的 Emacs 配置(窗口快速切换、一键透明效果、任意位置删除整行等)
本篇文章记录的是一些有用的 Emacs 配置,有些是自己原创,有些是借鉴别人(能记起来出处的我放了链接). 规定:C 代表 Ctrl,M 代表 Alt. 1.设置一次跳跃 n 行的快捷键 按 C-M- ...
- emacs 配置
个人的Emacs配置,环境是archlinux,参考了不少网上资料,因为太多,就不一一列举了,在这里感谢那些作者的辛苦经验劳动. (custom-set-variables ;; custom-set ...
- 绝世emacs配置for Ubuntu
反正过不了几天就要退役了,把emacs配置放出来造福(祸害)大众? 浓浓的OIER风格,除了方便打代码就没别的用处(F8并不这样认为?),只可惜windows下的弄丢了,只有Ubuntu下的. F1不 ...
- 存个emacs配置
emacs配置 (global-set-key [f9] 'compile-file) (global-set-key [f10] 'gud-gdb) (global-set-key (kbd &qu ...
- emacs 配置.emacs
emacs 配置.emacs (require 'package) (package-initialize) (add-to-list'package-archives '("melpa&q ...
- purcell的emacs配置中的自动补全功能开启
标记一下,原文参看purcell的emacs配置中的自动补全功能开启 修改init-auto-complete.el文件 ;;(setq-default ac-expand-on-auto-compl ...
- 中国大陆无法访问Steve Purcell的emacs配置解决办法
因为大陆网络问题,没办法访问Steve Purcell的emacs配置中的melpa.org,所以我们更改目录即可. 1.删除自己的配置. $ rm ~/.emacs $ rm -rf ~/.emac ...
- emacs配置&博客界面源代码
emacs配置 如果想要考场简单配置也可以去下面看,需要别的考场配置可以自己在下面比较全的里面找 考试备忘录(有新的就会更的...) By Junlier (global-set-key [f9] ' ...
随机推荐
- css居中方法与双飞翼布局
居中 类型 方法 对应属性 水平 垂直 水平&垂直 1.父元素使用外边距自动 2.子元素显示行内块级元素,写入内容,父元素设置文本居中 3.给父元素开启非绝对和固定定位作为子元素开启绝对定位的 ...
- ubuntu16.04安装ftp服务器
参考文章: http://www.linuxidc.com/Linux/2017-01/139233.htm 1.检查是否安装vsftpd,如果安装了跳过第二步 vsftpd -v 2.安装vsftp ...
- FreeSWITCH 内线拨号 总是使用 dialplan/public 拨号计划,而对 dialplan/default 视而不见
FreeSWITCH 内线拨号 总是使用 dialplan/public 拨号计划,而对 dialplan/default 视而不见 昨天还是 好好的额, 今天 就这样了, 导致 配置都乱了, 搞了 ...
- bzoj 1171 大sz的游戏& 2892 强袭作战 (线段树+单调队列+永久性flag)
大sz的游戏 Time Limit: 50 Sec Memory Limit: 357 MBSubmit: 536 Solved: 143[Submit][Status][Discuss] Des ...
- Hibernate学习(五)lazy属性学习(true和extra区别)
Lazy(懒加载)在hibernate何处使用:1.<class>标签上,可以取值:true/false,(默认值是:true)2.<property>标签上,可以取值:tru ...
- .NET Core阿里大于短信发送SDK修改以及使用
一.问题背景 继上次七牛云SDK的问题之后(参考:http://www.cnblogs.com/OMango/p/8447480.html),在发送短信的功能上又出现了问题,我们短信服务使用的是阿里大 ...
- php基本函数的学习(2)
chgrp chgrp — 改变文件所属的组 说明: bool chgrp ( string $filename , mixed $group ) 尝试将文件 filename 所属的组改成 grou ...
- CentOS7网卡命名规则
CentOS6之前基于传统的命名方式如:eth1,eth0.... Centos7提供了不同的命名规则,默认是基于固件.拓扑.位置信息来分配.这样做的优点是命名是全自动的.可预知的,缺点是比eth0. ...
- EntityFramework Core 2.0全局过滤(HasQueryFilter)
前言 EntityFramework Core每一次版本的迭代和更新都会带给我们惊喜,每次都会尽量满足大部分使用者的需求.在EF Core 2.0版本中出现了全局过滤新特性即HasQueryFilte ...
- iOS 开发之字典写入文件
在最近的开发中阿,遇到一个问题,是我开始没有注意到的问题,某个羡慕后期维护的过程中发现一个bug,这个bug就是关于字典写入文件的.缘由是这样的,我用字典写入文件的方法 BOOL result = [ ...