首页
Web开发
Windows程序
编程语言
数据库
移动开发
系统相关
微信
其他好文
会员
首页
>
系统相关
> 详细
emacs 配置文件
时间:
2016-05-20 11:21:06
阅读:
212
评论:
0
收藏:
0
[点我收藏+]
标签:
emacs 配置文件
[2016/05/20]
;; 把 .emacs.d 目錄加入到 load-path
;; 這樣的話本來需要放到 /usr/share/emacs/site-lisp/ 的東西
;; 就只需要放到 .emacs.d 裏面
(
add-to-list
‘load-path
"~/.emacs.d/"
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
; 軟件界面
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 去掉歡迎界面
(
setq
inhibit-startup-message
t
)
;; 在标题栏提示文件名字
(
setq
frame-title-format
"gu_castle@ %b"
)
;; 去掉工具栏
(
tool-bar-mode
nil
)
;;去掉菜单栏
(
menu-bar-mode
nil
)
;; 顯示行號
;; 1) linum.el 放入 .emacs.d
(
require
‘linum
)
;; 引用包
(
global-linum-mode
)
;; 在全局使用顯示行號的模式
;; 去掉滚动栏
(
scroll-bar-mode
nil
)
;; 顯示時間
(
display-time-mode
1
)
(
setq
display-time-24hr-format
t
)
(
setq
display-time-day-and-date
t
)
;; 启动窗口大小
(
setq
default-frame-alist
‘((height .
37
) (width .
85
)
(menu-bar-lines .
20
) (tool-bar-lines .
0
))
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
; 編輯界面
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 選擇高亮配色
;; 1) color-theme.el 和 theme 文件夹放入 .emacs.d
;; 2) 打開 Emacs,按 ‘M-x color-theme-select‘,選擇配色,按回車查看效果
;; 3) 選好你中意的效果,然後按 d 出現配色的描述信息,以 matrix 配色爲例子:
;; color-theme-matrix is an interactive Lisp function in
;; `color-theme-library.el‘.
;; (color-theme-matrix)
;; Color theme by walterh@rocketmail.com, created 2003-10-16.
;; 4) 進入 .emacs 寫入 (color-theme-matrix)。
(
require
‘color-theme
)
(
color-theme-initialize
)
(
setq
color-theme-is-global
t
)
;;(color-theme-xp)
;;(color-theme-high-contrast)
;;(color-theme-classic)
;;(color-theme-jb-simple)
;;(color-theme-arjen)
(
color-theme-matrix
)
;; 显示括号匹配
(
show-paren-mode
t
)
(
setq
show-paren-style
‘parentheses
)
;; 回车缩进
(
global-set-key
"\C-m"
‘newline-and-indent
)
(
global-set-key
(
kbd
"C-<return>"
)
‘newline
)
;; 設置字體
;; 1) emacs->options->Set Default Font 選擇字體
;; 2) "M-x describe-font" & RET
;; 3) 將第一行冒號後的部分抄到下面的引號裏面
;;(set-default-font
;; " -unknown-Ubuntu Mono-normal-normal-normal-*-15-*-*-*-m-0-iso10646-1")
;; Ubuntu Mono
;;(set-default-font
;; " -outline-DejaVu Sans Mono-normal-normal-normal-mono-16-*-*-*-c-*-iso8859-2")
;; DejaVu Sans Mono
;;(set-default-font
;;"-outline-Lucida Console-normal-normal-normal-mono-16-*-*-*-c-*-iso10646-1")
;; Lucida Console
(
set-default-font
"-outline-Andale Mono-normal-normal-normal-mono-16-*-*-*-c-*-iso10646-1"
)
;; Andale mono
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
; 其他功能
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;使用 y or n 提問
;;(fset ‘yes-or-no-p‘ ‘y-or-n-p‘)
;; 支持emacs和外部程序的粘贴
(
setq
x-select-enable-clipboard
t
)
;; 不產生備份文件
(
setq-default
make-backup-files
nil
)
;; 不自動去掉行尾空格
(
setq
delete-trailing-whitespace
nil
)
;; 設置默認查找文件的目錄
(
setq
default-directory
"d:/Documents/"
)
;; 移動到第 n 行:M-g n
(
global-set-key
[
(
meta
g)
]
‘goto-line
)
;; 插入當前時間
(
defun
insert-curtime
()
"insert current time"
(
interactive
"*"
)
(
insert
(
current-time-string
)
)
)
;; Eshell 清屏
(
defun
eshell/cls
()
"to clear the eshell buffer."
(
interactive
)
(
let
(
(
inhibit-read-only
t
)
)
(
erase-buffer
)
)
)
;; hs-minor-mode 按鍵綁定
;; 如果要使用這個鍵,先運行 M-x hs-minor-mode
(
global-set-key
(
kbd
"M-,"
)
‘hs-toggle-hiding
)
emacs 配置文件
标签:
原文地址:http://www.cnblogs.com/gu-castle/p/5511049.html
踩
(
0
)
赞
(
0
)
举报
评论
一句话评论(
0
)
登录后才能评论!
分享档案
更多>
2021年07月29日 (22)
2021年07月28日 (40)
2021年07月27日 (32)
2021年07月26日 (79)
2021年07月23日 (29)
2021年07月22日 (30)
2021年07月21日 (42)
2021年07月20日 (16)
2021年07月19日 (90)
2021年07月16日 (35)
周排行
更多
gitlab 在linux安装环境下存储地址
2021-07-29
当 Mac 未检测到外部显示器时如何修复它
2021-07-29
Ubuntu18.04安装qemu遇到问题-qemu : Depends: qemu-system (>= 1:2.11+dfsg-1ubuntu7)
2021-07-28
[Linux]Shell编程【待续】
2021-07-28
Linux系统资源查看
2021-07-27
Archlinux爬坑指南
2021-07-27
[Linux]Linux发展历程
2021-07-27
非桌面系统 (ubuntu)安装google-chrome
2021-07-27
在Ubuntu18.04系统中源码安装 gcc7.3.0
2021-07-23
Linux快捷键杂记
2021-07-22
友情链接
兰亭集智
国之画
百度统计
站长统计
阿里云
chrome插件
新版天听网
关于我们
-
联系我们
-
留言反馈
© 2014
mamicode.com
版权所有 联系我们:gaon5@hotmail.com
迷上了代码!