Emacs Config in OI

Zheng Yu lucky

简介

在VSCode大行其道的今天,emacs已经不再是OIer的首选编辑器了,但是emacs毕竟陪伴了我很久,让我无法放弃它,所以我决定把我的emacs配置备份在此 :

功能一览

  1. 隐藏多余的控件
1
2
3
(menu-bar-mode 0)
(tool-bar-mode 0)
(scroll-bar-mode 0)
  1. 解决编码问题
1
2
3
4
5
6
7
(prefer-coding-system 'cp950)
(prefer-coding-system 'gb2312)
(prefer-coding-system 'cp936)
(prefer-coding-system 'gb18030)
(prefer-coding-system 'utf-16)
(prefer-coding-system 'utf-8-dos)
(prefer-coding-system 'utf-8-unix)
  1. solarized light 主题

  2. 设置背景透明

1
2
3
4
5
6
7
8
9
10
11
(setq alpha-list '((85 55) (100 100)))    
(defun loop-alpha ()
(interactive)
(let ((h (car alpha-list)))
((lambda (a ab)
(set-frame-parameter (selected-frame) 'alpha (list a ab))
(add-to-list 'default-frame-alist (cons 'alpha (list a ab)))
) (car h) (car (cdr h)))
(setq alpha-list (cdr (append alpha-list (list h))))
)
)
  1. d跳转窗口快捷键

    1
    2
    3
    4
    (global-set-key [M-left] 'windmove-left)
    (global-set-key [M-right] 'windmove-right)
    (global-set-key [M-up] 'windmove-up)
    (global-set-key [M-down] 'windmove-down)
  2. 鼠标滚轮放大缩小

1
2
(global-set-key (kbd "<C-mouse-4>") 'text-scale-increase)
(global-set-key (kbd "<C-mouse-5>") 'text-scale-decrease)
  • Post title:Emacs Config in OI
  • Post author:Zheng Yu
  • Create time:2019-06-15 15:55:13
  • Post link:https://dataisland.org/2019/06/15/emacs-config/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.
On this page
Emacs Config in OI