Skip to content

Commit ec51425

Browse files
committed
添加YAML支持
1 parent 5866dda commit ec51425

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

lisp/init-frame.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
(add-to-list 'default-frame-alist '(font . "Menlo-13"))
2323
(set-fontset-font "fontset-default" 'han '("STHeiti"))
2424
))
25-
25+
2626
(config-add-hook 'after-make-console-frame-hooks
2727
;; 控制台下 C-<方向键> 修复
2828
(let ((map (if (boundp 'input-decode-map)
@@ -43,15 +43,15 @@
4343
(mwheel-install)
4444
)
4545
)
46-
46+
4747
(if (and (eq system-type 'darwin) *is-frame*)
4848
(config-bind-global-key (kbd "C-M-f")
4949
;; 使用C-M-f触发全屏模式
5050
(if (fboundp 'toggle-frame-fullscreen)
5151
(toggle-frame-fullscreen)
5252
)
5353
))
54-
54+
5555
(config-bind-global-key (kbd "C-z")
5656
;; 控制台下使用`C-z`暂停程序
5757
(unless window-system (suspend-frame))

lisp/init-window.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
(config-after-fetch-require 'ido-select-window
1111
(global-set-key (kbd "C-x o") 'ido-select-window))
1212
)
13-
13+
1414
(config-bind-global-key (kbd "C-x 1")
1515
;; 删除其它面板,如果没有其它面板就恢复前一个面板布局
1616
(if (and winner-mode (equal (selected-window) (next-window)))

lisp/init-yaml.el

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
;;; package -- YAML 模式
2+
;;; Commentary:
3+
;;; Code:
4+
5+
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))
6+
7+
(config-after-fetch-require 'yaml-mode
8+
(add-hook 'yaml-mode-hook
9+
'(lambda ()
10+
(define-key yaml-mode-map "\C-m" 'newline-and-indent)))
11+
)
12+
13+
(provide 'init-yaml)
14+
15+
;; Local Variables:
16+
;; coding: utf-8
17+
;; End:
18+
19+
;;; init-yaml.el ends here

0 commit comments

Comments
 (0)