(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)
(setq-default indent-tabs-mode nil)
(setq c-basic-offset 4)
(setq c-default-style "linux")
(setq default-tab-width 4)
(setq default-frame-alist
             '((vertical-scroll-bars)
               (background-color . "grey15")
               (foreground-color . "grey")))
(defun compile-file ()
  (interactive)
  (compile (format "g++ -o %s %s -g -lm -Wall -O2 --std=c++11"  (file-name-sans-extension (buffer-name))(buffer-name))))
(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)
(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)
 '(tool-bar-mode nil))

qaq

(global-set-key [f9] 'compile)
(global-set-key [f10] 'gud-gdb)
(setq default-tab-width 4)
(setq c-default-style "awk")
(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)
 '(cua-mode t nil (cua-base))
 '(inhibit-startup-screen t)
 '(show-paren-mode t)
 '(tool-bar-mode nil))
(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.
 )

考场配置(下面一部分可以在图形界面配)

(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)))

(setq c-basic-offset 4)
(setq-default indent-tabs-mode t)
(setq-default tab-width 4)
(setq default-tab-width 4)

(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 -O2 -std=c++11"  (file-name-sans-extension (buffer-name))(buffer-name))))
;;(global-set-key (kbd "<f9>") 'compile-file)
;;;;;设置一键调试
;;;;;改变emacs标题栏的标题
(setq frame-title-format "%b newbiegcz")
;;;;;允许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.
 )

小蒟蒻的垃圾emacs配置的更多相关文章

  1. 关于如何食用Xcode——用mac的小蒟蒻

    前言QwQ 对于一只用Mac的小蒟蒻,没有Dev_c++简直太难受了,用在线IDE写代码又没法保存,那么我们怎么办呢? 好在App Store里有这个好东西 所以我们今天来介绍一下 “如何使用Xcod ...

  2. 蒟蒻关于斜率优化DP简单的总结

    斜率优化DP 题外话 考试的时候被这个玩意弄得瑟瑟发抖 大概是yybGG的Day4 小蒟蒻表示根本不会做..... 然后自己默默地搞了一下斜率优化 这里算是开始吗?? 其实我讲的会非常非常非常简单,, ...

  3. [New!!!]欢迎大佬光临本蒟蒻的博客(2019.11.27更新)

    更新于2019.12.22 本蒟蒻在博客园安家啦!!! 本蒟蒻的博客园主页 为更好管理博客,本蒟蒻从今天开始,正式转入博客园. 因为一些原因,我的CSDN博客将彻底不会使用!!!(带来不便,敬请谅解) ...

  4. 蒟蒻kc的垃圾数列

    题目背景 在某教练的强迫之下,我一个蒟蒻居然出题了!!!出题了!!!(数据太水别找我qwq) 好的,JL说好的一题100快拿来 题目描述 首先,给你一个空的长度为n的序列(废话) 然后,你有一系列神奇 ...

  5. Emacs配置(考场必备)(Emacs)

    最近有几次离开自己一直坐着的座位,去别的机房考试了. 于是猛然想起来要记一记Emacs的简洁配置了. 算是把NOIP残存的记忆再拾一点起来...... 附上一些解释 (global-set-key [ ...

  6. 【BZOJ-4636】蒟蒻的数列 动态开点线段树 ||(离散化) + 标记永久化

    4636: 蒟蒻的数列 Time Limit: 30 Sec  Memory Limit: 256 MBSubmit: 247  Solved: 113[Submit][Status][Discuss ...

  7. [BZOJ4636]蒟蒻的数列

    [BZOJ4636]蒟蒻的数列 试题描述 蒟蒻DCrusher不仅喜欢玩扑克,还喜欢研究数列 题目描述 DCrusher有一个数列,初始值均为0,他进行N次操作,每次将数列[a,b)这个区间中所有比k ...

  8. 蒟蒻修养之cf橙名计划

    因为太弱,蒟蒻我从来没有上过div1(这就是今年的最后愿望啊啊啊啊啊)已达成................打cf几乎每次都是fst...........所以我的cf成绩图出现了惊人了正弦函数图像.. ...

  9. 【BZOJ】4636: 蒟蒻的数列

    4636: 蒟蒻的数列 Time Limit: 30 Sec  Memory Limit: 256 MBSubmit: 145  Solved: 71[Submit][Status][Discuss] ...

随机推荐

  1. 基于redis实现分布式Session

    学习到好的知识还是需要记录下来的. 开发环境 asp.net mvc4,iis.asp.net 自带的session机制存在诸多不好的地方.先只要列出几点. asp.net mvc 默认的sessio ...

  2. [原创]升级SOUI WKE以支持_blank

    由于WKE的精简模式,导致原有的SOUI不支持针对诸多内容的调用,此处针对WKE的部分内容做升级,以支持对应的功能. 目的:使WKE可以_blank弹出新窗口. 由国人 海绵宝宝维护的WKE新分支:h ...

  3. java网站如何集成facebook第三方登录

    第一次接触Facebook第三方登录,可能有些地方做的并不全面,只是尝试着做了一个小demo,因为国内接入Facebook的项目并不多,并且多数都是Android或iOS的实现,所以资料也特别少,在此 ...

  4. Spring Boot利用poi导出Excel

    至于poi的用法就不多说了,网上多得很,但是发现spring boot结合poi的就不多了,而且大多也有各种各样的问题. public class ExcelData implements Seria ...

  5. org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'deptDao_a' defined in class path resource [beansAndHibernate.xml]: Cannot resolve reference to bean 'sessionFact

    Error creating bean with name 'deptDao_a' defined in class path 因为更改了类的名字,所以其setter方法没有更改,需要 private ...

  6. g++中宏NULL究竟是什么?

    NULL是个指针,还是个整数?0?或(void*)0?答案是和g++版本有关.g++ 4.6支持C++11,引入了nullptr,也许会发生变化. 可以写段简单代码求证一下: #include < ...

  7. ARM汇编程序中的伪指令

    转自http://blog.chinaunix.net/uid-13701930-id-336459.html 4.1 ARM汇编器所支持的伪指令 在ARM汇编语言程序里,有一些特殊指令助记符,这些助 ...

  8. Asp.net MVC 自定义路由

    在做公司接口的时候  由于规范API 要用点分割. 如: HealthWay.controller.action 在MVC 4 下面做了个 路由配置如下: public override void R ...

  9. Android-获取网络图片设置壁纸

    下载图片,设置壁纸 的代码: package liudeli.async; import android.app.Activity; import android.app.ProgressDialog ...

  10. [javascript]模块化&命名污染—from 编程精解

    最近看了编程精解里面的模块化一章,很受启发. /****************/ 在开发的实际过程中,根据页面或者逻辑布局,js代码可以按照功能划分为若干个区块:数据交互.表单验证.页面布局等等模块 ...