Sublime Text如何显示不可打印的字符(我对SPACE和TAB感兴趣)?
要查看空白处,设置为。
// Set to "none" to turn off drawing white space, "selection" to draw only the
// white space within the selection, and "all" to draw all white space
"draw_white_space": "selection",
如果你进入Preferences->Settings Default,你就可以看到它。如果你编辑你的用户设置(Preferences->Settings - User),并按下面的方法添加这一行,你应该会得到你想要的东西。
{
"color_scheme": "Packages/Color Scheme - Default/Slush & Poppies.tmTheme",
"font_size": 10,
"draw_white_space": "all"
}
记住,设置是JSON格式的,所以没有尾部的逗号。
在选定的文本中,SPACE显示为点(.),TAB显示为破折号(-)。
如果你真的只想看到尾部的空格,这个ST2插件可以做到:https://github.com/SublimeText/TrailingSpaces
这里有一个官方的教程,如何做到这一点!。 *http://sublimetexttips.com/show-whitespace-sublime-text/。
就像这样!
[![在此输入图片描述][1]][1]。 [![在此输入图像描述][2]][2]
希望对你的帮助!希望对你的帮助!
[1]: https://i.stack.imgur.com/q2R8q.png [2]: https://i.stack.imgur.com/maIXK.png
我知道这是个老话题,但我喜欢我自己的插件,它可以通过一个快捷键[循环浏览空白][1]模式(无、选择和全部)。 它还提供了视图|空白菜单下的菜单项。
希望大家会觉得这个很有用--很多人都在用它 :)
http://sublimetexttips.com/show-whitespace-sublime-text/
Ctrl+Shift+P</kbd>。
2.搜索
首选项:设置 -> 用户?
<!--开始片段。 js hide: false console: true babel.false --> -- begin snippet: js hide: false console: true false -->
{
"draw_white_space": "all",
"translate_tabs_to_spaces": true
}
<!--结束片段-->
我有好几个插件(包括Unicode字符高亮器),但今天唯一一个找到躲在我身边的字符的是高亮器。
你可以通过粘贴readme中的文字来测试它是否有效。
作为参考,给我带来麻烦的字符是
。
为了确保安全,请在包含不可见字符的文本范围上点击右箭头键,你需要右键两次才能移动过去。
我还在使用以下自定义的 regex 字符串(我不完全理解)。
{
// there's an extra range in use [^\\x00-\\x7F]
// also, don't highlight spaces at the end of the line (my settings take care of that)
"highlighter_regex": "(\t+ +)|( +\t+)|[^\\x00-\\x7F]|[\u2026\u2018\u2019\u201c\u201d\u2013\u2014]"
}