`

c++ clang_complete

 
阅读更多

  前一段时间发现了clang complete,发现效果很好(广告一下:D).所以推荐一下.clang complete是llvm/clang带来的额外功能.clang complete是靠编译C++文件,应该是获得抽象语法树,进而进行补全的.所以,补全效果非常好,非常准确.但是,也有可能会比较慢.

  OK,有兴趣的多去Google一下llvm/clang,关注一下llvm/clang这些个项目.顺便关注一下clang_complete,这些项目更新的都很快.

  clang complete有两种补全,一种是用clang(exec)编译代码进行补全,另外一种是用libclang,后一种依赖python.我们来看看后一种.

  安装clang complete插件

  到https://github.com/Rip-Rip/clang_complete上面去下载最新的插件,这个插件更新很快,我第一次用的时候,还没有libclang支持~~,然后按照README,把他拷贝到~/.vim/plugin 下面就行了.

  这个时候,打开一个cpp文件,看看能不能通过:: , . , ->来获得智能提示. 顺便提一句,clang complete不能和omnicppcomplete和平共处,必须得删掉omnicppcomplete才可以工作....一般情况下,只要你拷贝对了位置,vimrc里面打开了所有插件,那么就可以获得智能提示.

 .vimrc里面配置:

let g:clang_complete_copen=1
let g:clang_use_library =1

    以下图片来自网络

  后面附上一张clang complete补全的图片:

  

  

  

 

分享到:
评论

相关推荐

    clang_library

    .clang complete是llvm/clang带来的额外功能.clang complete是靠编译C++文件,应该是获得抽象语法树,进而进行补全的.所以,补全效果非常好,非常准确

    C++17 The Complete Guide

    C++17 is the next evolution in modern C++ programming, which is already at least partially supported by the latest version of gcc, clang, and Visual C++. Although it is not as big a step as C++11, it ...

    C++17: the complete guide

    s the next evolution in modern C++ programming, which is already at least partially supported by the latest version of gcc, clang, and Visual C++. Although it is not as big a step as C++11, it ...

    《C++17 完全指南》

    本书为《C++17 the complete guide》(第一版) by Nicolai M. Josuttis的个人中文翻译版, 仅供学习和交流使用 C++17是现代 C++编程中的下一个版本,最新版本的gcc、clang和 Visual C++ 都至少已经部分支持它。尽管 ...

    C++17 - The Complete Guide by Nicolai M. Josuttis

    C++17 is the next evolution in modern C++ programming, which is already at least partially supported by the latest version of gcc, clang, and Visual C++. Although it is not as big a step as C++11, it ...

    c++ 20 the complete Guide (2022)

    latest version of gcc, clang, and Visual C++. The move to C++20 is at least as big a step as the move to C++11. C++20 contains a significant number of new language features and libraries that again ...

    ncm2-pyclang:缓存,快速CC ++完成ncm2

    特征: 支持CMake或类似的生成compile_commands.json构建系统支持.clang_complete像 支持用于Linux内核和u-boot的init/.main.o.cmd ,它会生成类似init/.main.o.cmd 支持goto声明。 (不转到定义) 支持#include...

    Android NDK Game Development Cookbook 无水印pdf 0分

    It presents Android application development in C++ and shows you how to create a complete gaming application. You will learn how to write portable multithreaded C++ code, use HTTP networking, play ...

    EasyClangComplete:Sublime Text 3的强大CC ++代码完成功能

    Ubuntu : sudo apt-get install clang OSX :默认情况下提供clang 。 你们都准备好了! Windows :从clang网站安装最新版本。 其他系统:使用您的软件包管理器或从clang网站安装。 clang网站: : //llvm.org/...

    matlab消除回声的代码-emacs.d:我的emacs配置文件,支持C/C++,Matlab,Haskell,LaTeX等

    ++,对于auto-complete-clang必需的) ghci 7.10.1或更高版本(适用于Haskell) 启用TLS以安全连接到ELPA 默认情况下,ELPA是通过HTTP访问的,这可能会导致安全问题,因此我更喜欢使用HTTPS。 只需将ELPA存储库地址...

    Learn Objective-C on the Mac

    * A complete course on the basics of Objective-C using Apple's newest Xcode tools * An introduction to object-oriented programming * Comprehensive coverage of new topics like blocks, GCD, ARC, class ...

Global site tag (gtag.js) - Google Analytics