vim-compiledb-path


Ⅰ. 插件描述

Ⅱ. 基本信息

创建日期:  2014-11-01
使用用户:  10
Github星:  4
插件作者:  Gabor Marton

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'martong/vim-compiledb-path'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'martong/vim-compiledb-path'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'martong/vim-compiledb-path'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/martong/vim-compiledb-path

Ⅳ. 文档说明

#CompileDbPath

You can use this plugin to add C++ include directories to your path. The include
directories are collected from the given [compilation
database](http://clang.llvm.org/docs/JSONCompilationDatabase.html) file.
Once you have the include directories in your path, than you can use e.g. gf to
open any file under your cursor.

To add the include directories to your path, just call :CompileDbPath with the
path to your compile_commands.json file as an argument. E.g.:

:CompileDbPath build/compile_commands.json

you can also add directories like this:

:CompileDbPathIfExists build/compile_commands.json

The latter will fail silently if the passed file doesn't exist.

You can reset to the default path with :set path& .

Installation

Use vundle or any other vim plugin solutions.

添加新评论