<bdo id='0EiTx'></bdo><ul id='0EiTx'></ul>

    1. <small id='0EiTx'></small><noframes id='0EiTx'>

      <i id='0EiTx'><tr id='0EiTx'><dt id='0EiTx'><q id='0EiTx'><span id='0EiTx'><b id='0EiTx'><form id='0EiTx'><ins id='0EiTx'></ins><ul id='0EiTx'></ul><sub id='0EiTx'></sub></form><legend id='0EiTx'></legend><bdo id='0EiTx'><pre id='0EiTx'><center id='0EiTx'></center></pre></bdo></b><th id='0EiTx'></th></span></q></dt></tr></i><div id='0EiTx'><tfoot id='0EiTx'></tfoot><dl id='0EiTx'><fieldset id='0EiTx'></fieldset></dl></div>
    2. <tfoot id='0EiTx'></tfoot>
      <legend id='0EiTx'><style id='0EiTx'><dir id='0EiTx'><q id='0EiTx'></q></dir></style></legend>

        班级在 Vim 中高亮显示函数名称

        时间:2023-07-01
          • <small id='8c3ZU'></small><noframes id='8c3ZU'>

              <tbody id='8c3ZU'></tbody>

            • <bdo id='8c3ZU'></bdo><ul id='8c3ZU'></ul>
                <i id='8c3ZU'><tr id='8c3ZU'><dt id='8c3ZU'><q id='8c3ZU'><span id='8c3ZU'><b id='8c3ZU'><form id='8c3ZU'><ins id='8c3ZU'></ins><ul id='8c3ZU'></ul><sub id='8c3ZU'></sub></form><legend id='8c3ZU'></legend><bdo id='8c3ZU'><pre id='8c3ZU'><center id='8c3ZU'></center></pre></bdo></b><th id='8c3ZU'></th></span></q></dt></tr></i><div id='8c3ZU'><tfoot id='8c3ZU'></tfoot><dl id='8c3ZU'><fieldset id='8c3ZU'></fieldset></dl></div>
                <tfoot id='8c3ZU'></tfoot>
              • <legend id='8c3ZU'><style id='8c3ZU'><dir id='8c3ZU'><q id='8c3ZU'></q></dir></style></legend>

                  本文介绍了班级在 Vim 中高亮显示函数名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在对它的模态输入上瘾之后,我最近刚刚从 Textmate 设置了我的 Vim 环境.

                  I just recently set up my Vim environment from Textmate, after becoming addicted to its modal input.

                  然而,语法高亮在 Vim 中似乎没有那么漂亮.我用 C++ 编写代码,由于无法突出显示函数调用和类名,因此代码更难阅读.我玩了一会儿配色方案,但找不到任何与类名"或函数名"相对应的字段.

                  However, syntax highlighting seems to be not so beautiful in Vim. I code in C++ and since the function call and class names can't be highlighted, the code is more difficult to read. I played with color scheme for a bit, but couldn't find any field that corresponded to "class name" or "function name".

                  在下图中,注意 DroughtLayer::*.size() 在 MacVim 的右侧没有突出显示.

                  In the picture below, notice how DroughtLayer:: and *.size() is not highlighted on the right in MacVim.


                  (来源:ivzhao.com)

                  任何想法如何解决这个问题?这真的让我很恼火,因为我是一个对视觉非常敏感的人.

                  Any ideas how to solve this? It really annoys me as I am so much a visual-sensitive guy.

                  推荐答案

                  有趣的是,VIM 中的语法高亮器不支持将语法应用于标识符或函数名称——至少不支持 C 和 C++ 的语法高亮器.所以,即使你这样做:

                  Interestingly, the syntax highlighters in VIM don't support applying a syntax to identifiers or function names - at least not the syntax highlighters for C and C++. So, even if you do:

                  :hi Function guifg=red
                  

                  :hi Identifier guifg=red
                  

                  它没有给这些颜色.我似乎只是这些语言的关键字和常量.

                  it doesn't give these a color. I just seems to be not much more than keywords and constants for these languages.

                  这里,有人开始扩展 cpp 语法文件以支持方法名称.我想这是一个开始.http://vim.wikia.com/wiki/Highlighting_of_method_names_in_the_definition

                  Here, someone has started extending the cpp syntax file to support method names. It's a start I guess. http://vim.wikia.com/wiki/Highlighting_of_method_names_in_the_definition

                  这篇关于班级在 Vim 中高亮显示函数名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:我们可以使用 lambda 表达式作为函数参数的默认值吗? 下一篇:我不明白为什么这会导致我的程序崩溃?

                  相关文章

                      <bdo id='DsUg5'></bdo><ul id='DsUg5'></ul>
                  1. <small id='DsUg5'></small><noframes id='DsUg5'>

                    <i id='DsUg5'><tr id='DsUg5'><dt id='DsUg5'><q id='DsUg5'><span id='DsUg5'><b id='DsUg5'><form id='DsUg5'><ins id='DsUg5'></ins><ul id='DsUg5'></ul><sub id='DsUg5'></sub></form><legend id='DsUg5'></legend><bdo id='DsUg5'><pre id='DsUg5'><center id='DsUg5'></center></pre></bdo></b><th id='DsUg5'></th></span></q></dt></tr></i><div id='DsUg5'><tfoot id='DsUg5'></tfoot><dl id='DsUg5'><fieldset id='DsUg5'></fieldset></dl></div>

                    <tfoot id='DsUg5'></tfoot>
                      <legend id='DsUg5'><style id='DsUg5'><dir id='DsUg5'><q id='DsUg5'></q></dir></style></legend>