vim高亮单词

vim最多可以设置3组高亮(也就是最多只能设置三种颜色)

:mat[ch] {group} /{pattern}/
:2mat[ch] {group} /{pattern}/
:3mat[ch] {group} /{pattern}/

:match Label /hello/
取消高亮

:mat[ch] [none]
:2mat[ch] [none]
:3mat[ch] [none]

自定义高亮组

:highlight可以查看有哪些预设高亮组

:hi[ghlight] {group-name} {key}={arg} 
term=bold
cterm=bold
ctermfg=red
ctermbg=red
gui=bold
guifg=red
guibg=red
posted @ 2025-12-01 00:42  三月妻三月七  阅读(6)  评论(0)    收藏  举报