Announcement

Collapse
No announcement yet.

Color_Coded: Bringing LibClang Highlighting To Vim

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Color_Coded: Bringing LibClang Highlighting To Vim

    Phoronix: Color_Coded: Bringing LibClang Highlighting To Vim

    For users of the vim text editor interested in new syntax highlighting options, meet color_coded...

    http://www.phoronix.com/scan.php?pag...-Vim-Highlight

  • #2
    Originally posted by phoronix View Post
    Phoronix: Color_Coded: Bringing LibClang Highlighting To Vim

    For users of the vim text editor interested in new syntax highlighting options, meet color_coded...

    http://www.phoronix.com/scan.php?pag...-Vim-Highlight
    Given the fact that my c.vim syntax file is the size of Australia, having automated syntax highlighting is very interesting.
    Devel: Intel S2600C0, 2xE5-2658V2, 32GB, 6x2TB, 1x256GB-SSD, GTX1080, F33, Dell UP3216Q 4K.
    oVirt: Intel S2400GP2, 2xE5-2448L, 96GB, 10x2TB, GTX550, CentOS8.3.
    Win10: Gigabyte B85M-HD3, E3-1245V3, 32GB, 5x1TB, GTX980, Win10Pro.
    Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33, Dell U2711.
    Laptop: ASUS Strix GL502V, i7-6700HQ, 32GB, 1TB+256GB, 1070M, F33.

    Comment


    • #3
      Originally posted by gilboa View Post
      Given the fact that my c.vim syntax file is the size of Australia, having automated syntax highlighting is very interesting.
      Yes, definitely intersting (but not really new as Michael suggested... have it on my radar since quite some time).
      There is one downside: It needs to compile the file. And it does so while you type.
      If you already use vim for your C/C++/... development you most likely already use one of the fancy clang-plugins for autocompletion and analysis. So with color_coded you will end up with two plugins compiling the same file in parallel. Constantly. While you type. Not THAT good for performance.
      (I already see YCM bundle color_coded )

      Comment


      • #4
        Originally posted by schmalzler View Post
        Yes, definitely intersting (but not really new as Michael suggested... have it on my radar since quite some time).
        There is one downside: It needs to compile the file. And it does so while you type.
        If you already use vim for your C/C++/... development you most likely already use one of the fancy clang-plugins for autocompletion and analysis. So with color_coded you will end up with two plugins compiling the same file in parallel. Constantly. While you type. Not THAT good for performance.
        (I already see YCM bundle color_coded )
        To be honest even though I've been using vim to write code for the past 15 years, I never ventured outside Vim's built in code completion. Lousy as it is, its fast and I'm used to it's limitations.
        Maybe it's time to get with the program...

        Any favorite one? (Preferably one that's suitable to handle the Linux kernel and/or cross platform code?)
        Devel: Intel S2600C0, 2xE5-2658V2, 32GB, 6x2TB, 1x256GB-SSD, GTX1080, F33, Dell UP3216Q 4K.
        oVirt: Intel S2400GP2, 2xE5-2448L, 96GB, 10x2TB, GTX550, CentOS8.3.
        Win10: Gigabyte B85M-HD3, E3-1245V3, 32GB, 5x1TB, GTX980, Win10Pro.
        Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33, Dell U2711.
        Laptop: ASUS Strix GL502V, i7-6700HQ, 32GB, 1TB+256GB, 1070M, F33.

        Comment


        • #5
          Originally posted by gilboa View Post
          To be honest even though I've been using vim to write code for the past 15 years, I never ventured outside Vim's built in code completion. Lousy as it is, its fast and I'm used to it's limitations.
          Maybe it's time to get with the program...

          Any favorite one? (Preferably one that's suitable to handle the Linux kernel and/or cross platform code?)
          The two completion engines I am aware of (which at least get widely used) are Neocomplete (https://github.com/Shougo/neocomplete.vim) and YouCompleteMe (YCM - https://github.com/Valloric/YouCompleteMe). For C-type autocompletion YCM is really great. It bundles several other plugins to offer better integration. Neocomplete is just the engine, you have to find a clang-completer that fits your requirements best.
          There is a fork of YCM (https://github.com/oblitum/YouCompleteMe) that adds some interesting features which require latest clang-3.7 snapshot. Seems to provide even better results than VisualStudio (I have read tat in a discussion somewhere...)

          Personally I am using (original) YCM. You will need a ".ycm_extra_conf.py". There is a plugin to generate one for each of your projects (supports cmake, autotools, plain Makefile) called "YCM-Generator" (https://github.com/rdnetto/YCM-Generator). An alternative would be Bear (https://github.com/rizsotto/Bear), which only generates a clang compile_commands.json-file, which can be used with a matching ycm_extra_conf (have a look at e.g. https://github.com/gauteh/astroid/bl..._extra_conf.py).

          YCM needs to be conpiled (just follow instructions )

          Comment


          • #6
            Originally posted by schmalzler View Post
            The two completion engines I am aware of (which at least get widely used) are Neocomplete (https://github.com/Shougo/neocomplete.vim) and YouCompleteMe (YCM - https://github.com/Valloric/YouCompleteMe). For C-type autocompletion YCM is really great. It bundles several other plugins to offer better integration. Neocomplete is just the engine, you have to find a clang-completer that fits your requirements best.
            There is a fork of YCM (https://github.com/oblitum/YouCompleteMe) that adds some interesting features which require latest clang-3.7 snapshot. Seems to provide even better results than VisualStudio (I have read tat in a discussion somewhere...)

            Personally I am using (original) YCM. You will need a ".ycm_extra_conf.py". There is a plugin to generate one for each of your projects (supports cmake, autotools, plain Makefile) called "YCM-Generator" (https://github.com/rdnetto/YCM-Generator). An alternative would be Bear (https://github.com/rizsotto/Bear), which only generates a clang compile_commands.json-file, which can be used with a matching ycm_extra_conf (have a look at e.g. https://github.com/gauteh/astroid/bl..._extra_conf.py).

            YCM needs to be conpiled (just follow instructions )
            I'll check them out.
            Thanks for the information.

            - Gilboa
            Devel: Intel S2600C0, 2xE5-2658V2, 32GB, 6x2TB, 1x256GB-SSD, GTX1080, F33, Dell UP3216Q 4K.
            oVirt: Intel S2400GP2, 2xE5-2448L, 96GB, 10x2TB, GTX550, CentOS8.3.
            Win10: Gigabyte B85M-HD3, E3-1245V3, 32GB, 5x1TB, GTX980, Win10Pro.
            Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33, Dell U2711.
            Laptop: ASUS Strix GL502V, i7-6700HQ, 32GB, 1TB+256GB, 1070M, F33.

            Comment

            Working...
            X