为什么用Gedit

先放一个高配emacs配置

(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-set-key (kbd "C-q") 'zone)
(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 By SYCstudio")
;;;;;允许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功能肯定不全

当然你要把配置背下来我绝对不拦你 _

手把手配置GEDIT

配置环境

GEDIT可以说是麻雀虽小,五脏俱全。

在桌面上建好一个cpp文件

打开看,嗯,是很丑,名不虚传



在上方点击【编辑】(E) => 【首选项】(E) 打开后看到这样



我的是这么设置的







然后就好看多了

配置编译运行

对了!还有编程。

让我们回到首选项,在【插件】一栏选择【外部工具】



关闭首选项,在上方点击【工具】(T) => 【Manage External Tools...】

选择在此处打开终端



将如下复制到上面去(你其实可以对照一下[在此处打开终端]的配置代码,其实很多是可以直接copy的,这无疑给我们带来了很大的便捷)

然后根据你的习惯选择快捷键 (我一般是按,F2很方便)

#!/bin/sh
dir=$GEDIT_CURRENT_DOCUMENT_DIR
nam=$GEDIT_CURRENT_DOCUMENT_NAME
gnome-terminal --working-directory=$dir -x bash -c "g++ $nam -g -o te;
echo 'DONE';
./te;
echo;
echo 'END';
read"

总结

好了,这样就大功告成啦。

你编写好一个程序,按下F2

如果你有错误,会在弹出的终端上显示--到时候你对着改就行了。

编译成功,会显示DONE

程序运行完,会显示END

按回车键终端便会消失。

GEDIT配置真的很快,本人在noip考场上只用了2分钟配置完成。并且调试程序也很便捷。总而言之,gedit也是noip考场IDE的很好地选择。

最新文章

  1. [CC]ccHObject
  2. Discuss!X3.2 绑定微信
  3. 深入研究B树索引(一)
  4. BZOJ 2599 [IOI2011]Race【Tree,点分治】
  5. 新秀学习51供应链管理的----模拟笔记本PC和51串行通讯1
  6. javascript DOM 笔记
  7. SQL查询语句分类
  8. 1000多个项目中的十大JavaScript错误以及如何避免
  9. UnityEditorWindow自建窗口扩展
  10. 2018-2019-2 20165305《网络攻防技术》Exp5 MSF基础应用
  11. C#中异步使用及回调
  12. 18-09-21 numpy 的基础学习01
  13. ASP.NET服务器端控件原理分析
  14. CentOS 6.9下安装PostgreSQL
  15. 【Java】浅谈Java IO
  16. 2、Keepalived提供日志与双主模型演示
  17. PyQt+Html+Js
  18. php实现头像预览上传功能
  19. MongoDB索引,性能分析
  20. js 实现继承的6种方式(逐渐优化)

热门文章

  1. CSS3及JS媒体查询教程
  2. react-native WebView 返回处理 (非回调方法可解决)
  3. Hive metastore表结构设计分析
  4. MySQL select语句直接导出数据
  5. Linux常用命令手册
  6. windows下apache服务器开启压缩和网页缓存
  7. Deep Learning for Information Retrieval
  8. css渲染(一) 字体和文本
  9. Egret学习笔记 (Egret打飞机-6.实现敌机飞起来)
  10. Python使用Mysql官方驱动(取出dict类型的数据)