cppSyntaxCheck


Ⅰ. 插件描述

a vim plugin of cpp syntax check, using g++ as parser

Ⅱ. 基本信息

创建日期:  2012-09-03
使用用户:  1
Github星:  5
插件作者:  Phonzia Yang

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'phonzia/cppsyntaxcheck'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'phonzia/cppsyntaxcheck'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'phonzia/cppsyntaxcheck'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/phonzia/cppsyntaxcheck

Ⅳ. 文档说明

#cppSyntaxCheck

Introduction

This a script use g++ as a parser to check the syntax of cpp source code, and show where the errors and warnings are. Installion is in a easy way and everytime you save the file, syntax errors and warnings are showed.

See the install details for install guide, if you find any bugs or method to make it better, please contact me using e-mail: phonzia@gmail.com

Install details

Put the script cppSyntaxCheck.vim in folder ~/.vim/plugin, Make sure your compiler has been installed then it works

You can add statements below in order to adjust to your environment

let g:include_path=":../include:./include:./tinyxml"
let g:compile_flag="-D_LINUX_"
let g:cpp_compiler="/usr/bin/g++"
let g:enable_warning=1
let g:cpp_compiler="LANG=C g++ -Wall"

Key binding:

  • <Leader>s go to next signed error or warning line
  • <Leader>p show complete error message, very useful when error message is too long to be displayed

添加新评论