如何在Emacs中突出显示选项卡 [英] How to highlight tabs in Emacs
问题描述
我在源代码中使用空格来缩进,如何突出显示/标记代码中的选项卡?
I use spaces for indentation in source code, how can I highlight/mark tabs, that are in code?
它可能是红色的,与我使用(setq-default show-trailing-whitespace t)
It could be red, the same as when I use (setq-default show-trailing-whitespace t)
推荐答案
只需使用库 highlight-chars.el
.
Just use command toggle-highlight-tabs
from library highlight-chars.el
.
或者默认情况下,您可以通过将函数 hc-highlight-tabs
添加到初始化文件中的 font-lock-mode-hook
中来打开标签突出显示:
Or you can turn on tab highlighting by default by adding function hc-highlight-tabs
to font-lock-mode-hook
in your init file:
(add-hook 'font-lock-mode-hook 'hc-highlight-tabs)
您可以打开/关闭库突出显示字符提供的突出显示:
You can turn on/off the highlighting provided by library Highlight Chars:
- 仅在当前缓冲区(即本地)中
- 启用字体锁定模式时全局
- ,或者
- 每当缓冲区处于给定的主要模式时,都会自动
这篇关于如何在Emacs中突出显示选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!