emacs 笔记 常用功能 配置
来源:互联网 发布:json转化为list 编辑:程序博客网 时间:2024/05/29 15:54
load-path 配置
load-path 用于配置库文件的查找,参考:Load-Path from emacswiki.org
是否自动保存原文件
第一次存盘前Emacs 会将原文件重命名以备份。重命名的规则通常是在原文件名之后添加一个“~”字符。是否开启这个特性,可以通过make-backpakup-files选项配置:
M-x customize-variable <Return> make-backup-files <Return>
自动保存,恢复
emacs在当前目录下保存一个文件,文件名是#file-name#,这是用于自动保存当前的编辑缓冲,当C-x C-s时,把#file-name#复制到file-name中,如果遇到断电、宕机,下次再启动Emacs时,可以通过命令 M-x recover-file file-name (利用#file-name#)来恢复到断电前的编辑状态。
退出时,自动保持上次(session)文件打开状态
此段摘自:http://www.cnblogs.com/dylinux/archive/2010/10/30/1865005.html
;;打开上次的文件记录
(load "desktop")
(desktop-load-default)
(desktop-read)
;;当emacs退出时保存文件打开状态
(add-hook 'kill-emacs-hook
'(lambda()(desktop-save "~/")))当打开Emacs的时候会load一个状态保存文件‘desktop’,Emacs会在里面加载文件打开状态和上次光标的位置,你可以马上继续上一次的编辑工作,下面的一行语句是为 kill-emacs-hook函数添加一个hook,kill-emacs-hook函数会在我们关闭emacs的时候被调用,被调用的hook就是 desktop-save 函数,它负责在主目录下保存状态文件 也就是 desktop文件。
全屏
The following should work in Emacs 23:
(defun toggle-fullscreen (&optional f) (interactive) (let ((current-value (frame-parameter nil 'fullscreen))) (set-frame-parameter nil 'fullscreen (if (equal 'fullboth current-value) (if (boundp 'old-fullscreen) old-fullscreen nil) (progn (setq old-fullscreen current-value) 'fullboth)))))
(global-set-key [f11] 'toggle-fullscreen)
; Make new frames fullscreen by default. Note: this hook doesn't do ; anything to the initial frame if it's in your .emacs, since that file is ; read _after_ the initial frame is created. (add-hook 'after-make-frame-functions 'toggle-fullscreen)此版本只适用于GNU Linux,更多信息,参考:http://www.emacswiki.org/cgi-bin/wiki/FullScreen
最大化屏幕
安装 maxframe.el
https://github.com/rmm5t/maxframe.el
Semantics
自动补全:http://www.zxbc.cn/html/20081218/69067.html
- emacs 笔记 常用功能 配置
- emacs 常用配置
- emacs Window 常用配置
- emacs不常用配置
- Emacs 常用配置
- Emacs常用快捷键笔记
- emacs windows配置笔记
- emacs配置笔记
- Emacs配置及使用笔记
- 如何配置emacs的msf-abbrev功能
- [Emacs] 1.3 我的常用按键配置
- Emacs 笔记 常用快捷键和命令
- Emacs学习笔记(7):简单的配置
- Emacs 常用
- emacs配置.emacs
- 【Nginx】常用功能配置
- [Emacs]Emacs初学笔记
- GridView常用功能笔记
- 内存转换和分段 Memory Translation and Segmentation
- Android游戏开发之Tween动画的实现(三十二)
- SqlParameter.Size 属性
- 如何查看端口号被哪个程序占用
- 第十二章 5 IO包下的其他对象
- emacs 笔记 常用功能 配置
- CPU 环, 优先级和保护 CPU Rings, Privilege, and Protection
- 在C#中利用Keep-Alive处理Socket网络异常断开的方法
- MessageBox的使用
- 内存中的程序剖析 Anatomy of a Program in Memory
- 代理ARP
- C/C++书籍
- oracle学习笔记五——数据库优化
- Kernel是如何管理你的内存 How The Kernel Manages Your Memory