简体   繁体   English

VIM中奇怪的制表符

[英]Weird tab character in VIM

I am having issue figuring out what this weird white block of characters are. 我在弄清楚这个奇怪的白色字符块是什么时遇到了问题。 Anyone know how I can get rid of it? 有人知道我该如何摆脱它吗? Thanks! 谢谢!

http://s11.postimg.org/kas9430gz/vimtab.png http://s11.postimg.org/kas9430gz/vimtab.png

UPDATE: Thanks to romanil's comment. 更新:感谢romanil的评论。 It is Indent Guides. 它是缩进指南。

Take a look at http://vim.wikia.com/wiki/Hex_dump 看看http://vim.wikia.com/wiki/Hex_dump

If you run the vi command 如果运行vi命令

:%!xxd

It should convert the buffer into a hexdump and you should be able to see exactly what characters they correspond to. 它应该将缓冲区转换为十六进制转储,并且您应该能够准确看到它们对应的字符。

It's hard to tell from the image, but maybe there isn't a special character at all. 很难从图像中看出来,但也许根本没有特殊字符。 Vim highlights characters in certain conditions—eg, search results or matching braces—which may look like this depending on your configuration. Vim在某些情况下(例如,搜索结果或大括号)突出显示字符,具体取决于您的配置。 You could turn off syntax highlighting using 您可以使用关闭语法高亮显示

:syntax off

or view the file in another program (eg, less ) to see if that's causing the issue. 或在另一个程序中查看文件(例如, less )以查看是否是引起问题的原因。 If that doesn't help, you can always clean your file of any fancy characters using 如果这样没有帮助,您可以始终使用以下命令清除文件中所有花哨的字符

:%s,[^\t -~],,g

Note that this will remove any accented characters as well. 请注意,这也会删除所有带重音的字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM