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...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #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.
    oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
    oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
    oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
    Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, 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?)
        oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
        oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
        oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
        Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, 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
            oVirt-HV1: Intel S2600C0, 2xE5-2658V2, 128GB, 8x2TB, 4x480GB SSD, GTX1080 (to-VM), Dell U3219Q, U2415, U2412M.
            oVirt-HV2: Intel S2400GP2, 2xE5-2448L, 120GB, 8x2TB, 4x480GB SSD, GTX730 (to-VM).
            oVirt-HV3: Gigabyte B85M-HD3, E3-1245V3, 32GB, 4x1TB, 2x480GB SSD, GTX980 (to-VM).
            Devel-2: Asus H110M-K, i5-6500, 16GB, 3x1TB + 128GB-SSD, F33.

            Comment

            Working...
            X