When I was using vim to edit text recently, I encountered a red background highlight of '_' in a word. How can I cancel this?
.vimrc theme:elfford.
When I edit *.md files, there are always highlights as shown in the picture below. How to remove them?
I use vim-markdown, which doesn’t seem to have this problem
This is mostly a matter of grammar recognition. It stands to reason that the underline here should be recognized according to the text.
You can do this, first move the cursor to the underlined position in vim, and execute above
:echo synIDattr(synID(line("."),col("."),0),"name"
This will output the grammar recognition mark of the current position. . Remember the output. Is it possible that you are reporting an error or something? I guess
My output is
mkdNonListItemBlock
,命令行里(bash之类的)执行grep -r 'mkdNonListItemBlock' .
,就会输出这个语法识别所在的文件。我的就是对应~/.vim/plugged/vim-markdown/syntax/markdown.vim
Of course you can solve this problem by escaping, markdown itself also has escaping. . But in your case there is no need to escape. . When multiple people collaborate, escaping
_
还是**
之间用__
will cause unnecessary diff. It is recommended that you use the vim-markdown plug-in to solve the problemThe problem is currently solved:
No other configuration has been modified. In fact, when we edit markdown files, we often cause other abnormal displays due to the syntax of markdown. For my above problem, just escape the underline
_
character.At the same time, when this underline appears
* 或 ** 或 **
之间的时候, 也会出现其他样式的问题, 这时候对于下划线,可以__
use two underlines to solve the style problem.