今天发现快捷键不起作用啦,tab是8个空格,明明以前好好的啊?请教各位。
emacs 27.1
;; tab缩进
(setq-default default-tab-width 4)
(setq-default indent-tabs-mode nil)
;;
;; F5 一键对齐
;;
(defun indent-buffer ()
"Indent the whole buffer."
(interactive)
(save-excursion
(indent-region (point-min) (point-max) nil)))
(global-set-key [f5] 'indent-buffer)
;;
;; F6 快速打开配置文件
;;
(defun open-init-file()
(interactive)
(find-file "~/.emacs"))
(global-set-key (kbd "<f6>") 'open-init-file)