简体   繁体   English

Vim标签列表标签上的黄色突出显示

[英]Vim Taglist Yellow Highlight on Tags

I have just now installed tag list plugin. 我刚刚安装了标签列表插件。 It is working fine except when, from the tag list window, I try to press Enter then the corresponding tag becomes yellow colored and hence I could not see anymore what I just searched for. 一切正常,除了在标签列表窗口中尝试按Enter键,然后相应的标签变为黄色,因此我再也看不到我刚刚搜索的内容时,它正常工作。 How to change the color to more visible one? 如何将颜色更改为更明显的颜色?

Also the searched Tag position is not fixed, it does not come in alignment with the tag in tag list window, is there any way to solve this? 另外,搜索到的标签位置不是固定的,它与标签列表窗口中的标签不符,有什么办法解决吗?

The line which I am actually trying to copy/paste in my .vimrc is 我实际上试图复制/粘贴.vimrc

highlight Search        ctermfg=red ctermbg=NONE cterm=bold,underline

Thanks in advance. 提前致谢。

To answer your second question about alignment, TagList is AFAIK not supposed to do that so there's nothing to "solve". 为了回答有关对齐的第二个问题,TagList不是AFAIK,所以没有什么可“解决”的。 If you want that feature, send a feature request to the author. 如果需要该功能,请向作者发送功能请求。

You'll probably find the Yellow color, by typing :highlight . 通过键入:highlight ,您可能会发现黄色。 It lists all the different highlight groups (Comments, Function, Search,..), and the associated color. 它列出了所有不同的突出显示组(“注释”,“功能”,“搜索” ..)以及相关的颜色。

The color of the different highlight groups are defined in the colorscheme . colorscheme中定义了不同高光组的颜色。

You can find the current colorscheme in use by typing :colorscheme . 您可以通过键入:colorscheme来找到当前正在使用的:colorscheme

Then you have different options. 然后,您有不同的选择。

  1. You can edit the colorscheme to modify the Yellow to something more readable that is stored in $HOME/.vim/colors (or $VIMRUNTIME/.vim/colors for system wide modification). 您可以编辑colorscheme来将Yellow修改为更具可读性的内容,存储在$HOME/.vim/colors (或$VIMRUNTIME/.vim/colors用于系统范围的修改)中。
  2. You can decide to use a completely different colorscheme by adding in your .vimrc a line, with colorscheme new_theme . 您可以通过在.vimrc中添加带有colorscheme new_theme的行来决定使用完全不同的colorscheme new_theme
  3. You can redefine the value of the single highlight group you want to change in your .vimrc 您可以在.vimrc重新定义要更改的单个突出显示组的值。

Assuming you want to modify the 'Search' group, you have to clear it first. 假设要修改“搜索”组,则必须先清除它。 For example, in your .vimrc : 例如,在您的.vimrc

 colorscheme  delek
 highlight Search    NONE
 highlight Search    gui=none      guifg=#544060 guibg=#f0c0ff ctermbg=1

You can find more information by using Vim built-in help. 您可以使用Vim内置的帮助找到更多信息。 :help highlight :help colorscheme :help highlight :help colorscheme

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

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