Emacs考场配置
当年\(NOip\)考场配置不记得啦
存在这里搞事情
(set-background-color "gray15")
(set-foreground-color "gray")
(global-set-key [f9] 'compile)
(global-set-key [f10] 'gud-gdb)
(global-set-key (kbd "C-s") 'save-buffer)
(global-set-key (kbd "C-a") 'mark-whole-buffer)
(global-set-key (kbd "RET") 'newline-and-indent)
(setq default-cursor-type 'bar)
(setq default-tab-width 4)
(setq c-default-style "awk")
(set-frame-parameter (selected-frame) 'alpha (list 85 50))
豪华版超级配置
(global-set-key [f9] 'compile-file)
(global-set-key [f10] 'gud-gdb)
(global-set-key (kbd "C-s") 'save-buffer)
(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 "yyb")
;;;;;允许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")
Emacs考场配置的更多相关文章
- 我的emacs考场配置
豪华配置(复制的神犇的,已膜改) (global-set-key [f9] 'compile-file) (global-set-key [f10] 'gud-gdb) (global-set-key ...
- Linux emacs考场配置及对拍脚本
emacs配置(待补) (global-set-key [f9] 'compile) (global-set-key [f10] 'gud-gdb) (global-set-ket (kbd &quo ...
- emacs 考场配置
先存在这里,免得等回来乱搞的时候把自己的配置搞丢了qwq (custom-set-variables '(custom-enabled-themes (quote (tango-dark)))) (c ...
- [daily][emacs][go] 配置emacs go-mode的编辑环境以及环境变量问题
1. 安装go 安装go-mode 使用emacs编辑go代码的时候,你需要有正常可运行的go环境. 并且有emacs的go-mode package https://www.emacswiki.or ...
- Emacs 安装配置使用教程
Emacs 安装配置使用教程 来源 https://www.jianshu.com/u/a27b97f900f7 序|Preface 先来一篇有趣的简介:Emacs和Vim:神的编辑器和编辑器之神 - ...
- emacs考场短配置
(set-background-color "gray15") (set-foreground-color "gray") ;;设置颜色 (global-set ...
- 【TEST】NOI-Linux可用 gedit c++精简配置 附Emacs日常配置
这里是backup的测试随笔,用于测试 CSS / Markdown 效果. 同时也是是本菜鸡考场上一般使用的Gedit配置. 只有6行,挺短的.应该算好记吧. 使用之前记得勾选首选项里的外部工具. ...
- ubuntu14.04 下emacs 24 配置
目的: 配置emacs 24 适合编程开发 主要参考JerryZhang的配置(Emacs 简易教程) http://www.perfect-is-shit.com/emacs-simple-tuto ...
- Emacs golang 配置
在配置前需要下载用到的包: godoc godef gocode oracle 在下载包之前需要设置好环境变量: # Golang export GOROOT=$HOME/go export GOPA ...
随机推荐
- typedef struct 的用法
typedef struct stu { int age; char name[20]; }stu,*pstu; stu stu1;相当于struct stu stu1; pstu pstu1;相当于 ...
- 【翻译】CSS Animations VS the Web Animations API:案例学习
原文地址:CSS Animations vs the Web Animations API: A Case Study May 03, 2017 css, javascript 上周我写了我如何使用C ...
- LINUX下的U盘挂载
linux下如果没有图形界面的情况下就要我们自己熟悉命令来挂载U盘,下面给大家详细描述下U盘的挂载过程. 1. 插入U盘 2. #sudo fdisk –l 查看所挂载盘符名称如下图,假设盘符名称为s ...
- Three.js 学习笔记(1)--坐标体系和旋转
前言 JavaScript 3D library The aim of the project is to create an easy to use, lightweight, 3D library ...
- Git环境配置+VSCode中文乱码问题
异常处理汇总-开发工具 http://www.cnblogs.com/dunitian/p/4522988.html 1.VSCode中文乱码问题 (files.autoguessEncoding= ...
- PS如何批量生成缩略图(方法可以通用其他重复劳动)
原图 缩略 进入正题,学生时代玩过脚本精灵的应该一点就通 原理就是:录制一系列动作,然后生成脚本,并执行(经常PS水印代码的一个可以用程序实现,一个就可以用PS脚本) 新建一个组 新建一个动作 进行你 ...
- hdu3480 Division(dp平行四边形优化)
题意:将n个数分成m段,每段的代价为最大值减最小值的平方,为代价最小是多少n<=10000 ,m<=5000 题解:先拍好序,从小到大,这样绝对是花费最小的,不过怎么样来做呢?一定很容易想 ...
- 项目中AppDelegate详解
1.AppDelegate.h //模板默认引入程序需要使用“类”的框架,即UIKit.h头文件,使它包含在程序中 #import <UIKit/UIKit.h> //此处@class声明 ...
- 《android开发艺术探索》读书笔记(五)--RemoteViews
接上篇<android开发艺术探索>读书笔记(四)--View工作原理 No1: RemoteViews使用场景:通知栏和桌面小部件 No2: 通知栏主要通过NotificationMan ...
- java并发编程笔记3-同步容器&并发容器&闭锁&栅栏&信号量
一.同步容器: 1.Vector容器实现了List接口,Vector实际上就是一个数组,和ArrayList类似,但是Vector中的方法都是synchronized方法,即进行了同步措施.保证了线程 ...