[英]Changing `rubyLocalVariableOrMethod` color in VIM
I was wondering whether it's possible to change the rubyLocalVariableOrMethod
color in a mytheme.vim
color scheme file. 我想知道是否可以在
mytheme.vim
颜色方案文件中更改rubyLocalVariableOrMethod
颜色。
I am currently extending the ir_black
theme which I really like, and want to overwrite just a few a colors for certain keywords. 我目前正在扩展我非常喜欢的
ir_black
主题,并希望为某些关键字覆盖几种颜色。
This is my current color scheme that extends from ir_black
. 这是我目前从
ir_black
扩展的配色方案。
runtime colors/ir_black.vim
let g:colors_name = "mytheme"
hi rubyDefine ctermfg=darkblue
hi rubyFunction ctermfg=lightblue
hi rubyConstant ctermfg=lightblue
hi rubyString ctermfg=green
hi rubyInteger ctermfg=red
hi rubyFloat ctermfg=red
hi rubyLocalVariableOrMethod ctermfg=white
Everything works as expected except for hi rubyLocalVariableOrMethod ctermfg=white
. 一切都按预期工作,除了
hi rubyLocalVariableOrMethod ctermfg=white
。 The color remains something that looks like gray
. 颜色仍然看起来像
gray
。 I thought perhaps ir_black
was setting a certain value that my rubyLocalVariableOrMethod
could not overwrite, but I failed to find anything. 我想也许
ir_black
设置了我的rubyLocalVariableOrMethod
无法覆盖的某个值,但我找不到任何东西。
Perhaps someone more experienced in VIM could help me out with this. 也许在VIM更有经验的人可以帮助我解决这个问题。
This is the link to the ir_black
I'm using: 这是我正在使用的
ir_black
的链接:
https://github.com/wgibbs/vim-irblack/blob/master/colors/ir_black.vim https://github.com/wgibbs/vim-irblack/blob/master/colors/ir_black.vim
This is the ruby
syntax file I am using: 这是我正在使用的
ruby
语法文件:
https://github.com/vim-ruby/vim-ruby/blob/master/syntax/ruby.vim https://github.com/vim-ruby/vim-ruby/blob/master/syntax/ruby.vim
Any help figuring out why I'm failing to overwrite the gray
-looking color would be much appreciated! 任何帮助弄清楚为什么我没有覆盖
gray
颜色将非常感激!
Mine was actually "display transparent" in the syntax highlighting plugin. 我的语法高亮插件实际上是“显示透明”。
~/.vim/bundle/vim-ruby/syntax/ruby.vim
92:syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent
I removed it and magic! 我删除它和魔法!
Turns out my Terminal ( iTerm2
)'s Foreground
property wasn't set to "full white". 结果我的终端(
iTerm2
)的Foreground
属性未设置为“全白”。 Didn't expect that to have any influence, but good to know in case anyone else runs in to this gotcha. 没想到会有任何影响,但要知道万一其他人遇到这个问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.