Linux下emacs简单配置

配置文件~/.emacs

默认字体可以通过界面设置并保存

<span style="font-size:12px;">(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.
 '(column-number-mode t)
 '(font-use-system-font 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 (:inherit nil :stipple nil :background "white" :foreground "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 120 :width normal :foundry "bitstream" :family "Courier 10 Pitch")))))

(setq column-number-mode t) 
;显示列号。 

(setq visible-bell t)
;关闭烦人的出错时的提示声。

(setq mouse-yank-at-point t)
;不要在鼠标点击的那个地方插入剪贴板内容。我不喜欢那样,经常把我的文档搞的一团糟。我觉得先用光标定位,然后鼠标中键点击要好的多。不管你的光标在文档的那个位置,或是在 minibuffer,鼠标中键一点击,X selection 的内容就被插入到那个位置。 

(setq kill-ring-max 200)
;用一个很大的 kill ring. 这样防止我不小心删掉重要的东西。我很努莽的,你知道 :P 

(setq default-fill-column 60)
;把 fill-column 设为 60. 这样的文字更好读。 

;(setq-default indent-tabs-mode nil)(setq default-tab-width 8)(setq tab-stop-list ())(loop for x downfrom 40 to 1 do      (setq tab-stop-list (cons (* x 4) tab-stop-list)))
;不用 TAB 字符来indent, 这会引起很多奇怪的错误。编辑 Makefile 的时候也不用担心,因为 makefile-mode 会把 TAB 键设置成真正的 TAB 字符,并且加亮显示的。 

;(setq sentence-end "\\([。!?]\\|……\\|[.?!][]\"')}]*\\($\\|[ \t]\\)\\)[ \t\n]*")(setq sentence-end-double-space nil)
;设置 sentence-end 可以识别中文标点。不用在 fill 时在句号后插入两个空格。 

(setq enable-recursive-minibuffers t)
;可以递归的使用 minibuffer。我经常需要这么做。 

;(setq scroll-margin 3      scroll-conservatively 10000)
;防止页面滚动时跳动, scroll-margin 3 可以在靠近屏幕边沿3行时就开始滚动,可以很好的看到上下文。

(setq default-major-mode 'text-mode)
;把缺省的 major mode 设置为 text-mode, 而不是几乎什么功能也没有的 fundamental-mode. 

(show-paren-mode t)(setq show-paren-style 'parentheses)
;括号匹配时显示另外一边的括号,而不是烦人的跳到另一个括号。

(mouse-avoidance-mode 'animate)
;光标靠近鼠标指针时,让鼠标指针自动让开,别挡住视线。 

(setq frame-title-format "emacs@%b")
;在标题栏显示buffer的名字,而不是  这样没用的提示。 

(auto-image-file-mode)
;让 Emacs 可以直接打开和显示图片。 

(global-font-lock-mode t)
;进行语法加亮。 

;(put 'set-goal-column 'disabled nil)(put 'narrow-to-region 'disabled nil)(put 'upcase-region 'disabled nil)(put 'downcase-region 'disabled nil)(put 'LaTeX-hide-environment 'disabled nil)
;把这些缺省禁用的功能打开。 
</span>





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值