/hook-speedbar.el Secret
Last active
July 24, 2023 07:34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq speedbar-directory-unshown-regexp "^\(\.\.*$\)\'");.开头的文件全部要显示出来 | |
(custom-set-variables | |
'(speedbar-show-unknown-files t) | |
'(speedbar-use-images ()) | |
) | |
(speedbar-add-supported-extension ".htm") | |
(speedbar-add-supported-extension ".php") | |
;;(local-set-key (kbd "j") 'speedbar-up-directory) | |
(setq truncate-lines ());换行开启 | |
(setq header-line-format nil) | |
(setq mode-line-format nil) | |
(defun speedbar-set-mode-line-format () | |
"原结尾回调speedbar-mode-line-update 清空";因为位置不能和主frame对齐 | |
;;(setq mode-line-format '("%l-%c " mode-line-position)) | |
();这里清空就可以setq mode-line-format nil会导致speedb中点开的buf也没有模式行 | |
) | |
;;把speedbar的窗口显示的位置写死,不同的显示器和不同的分辨率以及不同操作系统要自定义此函数中的数字,所有这个函数不能通用,这里是我针对win10 1920*1080的分辨率显示器的设置 | |
(defun my-speedbar-width() | |
(interactive) | |
(progn | |
(set-frame-width (selected-frame) 34) | |
(set-frame-height (selected-frame) 46) | |
(set-frame-position (selected-frame) 121 158) )) | |
(global-set-key (kbd "<f2>") 'speedbar) | |
(global-set-key (kbd "<f3>") 'my-speedbar-width) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment