emacs下vercial-border审美观记录

昨天一晚上时间都花在了emacs的vercial-border上。 一开始还不知道这个名词,以为是treemacs展示的效果,毕竟我是在打开treemacs的时候,才发现这个分割线太丑了,我的审美观在蠢蠢欲动了。 谁说程序员没有审美观的?只是前面有别的东西要研究,这次非要美化下这个分割线。

时间一分一秒的都花在了treemacs的一个个属性比对上,想着是不是有什么样式调整下,还下载了treemacs源码去查找。 一无所获的惆怅中,开始大秀我的英文: split搜下,border搜下。随着边搜索边分析(展开下:技术搜索,一定不要只是搜索找答案,要不断去分析和调整搜索的思路) 终于慢慢接近了我想要的结果x了,但是时间已经花了很久了,不小心超过了12点睡(已经坚持好几天不迟于12点睡了,我这该死的好奇心哈)。

分享下我的美化成果:

  • 原始效果欣赏:

emacs-border-1.jpg

越看越不好看。

  • 第一版效果:

(set-face-background 'vertical-border "black")

(set-face-foreground 'vertical-border "black")

emacs-border-2.jpg

把背景颜色和分隔符的颜色都设置成了黑色,看起来稍微好看一点。和我以前用的doom配置效果很像了。 但是还想继续美化?

  • 第二版效果:

(set-face-background 'vertical-border "black")

(set-face-foreground 'vertical-border "white")

(set-display-table-slot standard-display-table 'vertical-border (make-glyph-code ?┃))

emacs-border-3.jpg

调整了下分隔符,成为一根直线,而不是断断续续。

  • 第三版效果:

(set-face-background 'vertical-border (face-background 'default))

(set-face-foreground 'vertical-border "white")

(set-display-table-slot standard-display-table

'vertical-border (make-glyph-code ?┃))

emacs-border-4.jpg

调整了下背景色不用black,用默认色。

  • 终版效果:

好了是时候展示我的审美观了。 没有背景色的":"拼接。

emacs-border-5.jpg

其它方式custom-set-faces

(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.

'(vertical-border ((t (:inherit mode-line-inactive :background "black" :foreground "white" :weight semi-bold)))) )

使用 M-x customize-group 命令打开“Customization”菜单。 在搜索框中搜索“face”,然后选择“Faces”。 在下拉列表中选择“ertical-border”,然后单击“Show”按钮。 设置好后单击“Apply”按钮,然后单击“Save”按钮,以保存更改并退出菜单。 就会在custom-set-faces 生成配置。感兴趣可以试下。

最后

enjoy!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

余很多之很多

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值