headerguard


Ⅰ. 插件描述

Vim plugin for adding header guards to C/C++ header files

Ⅱ. 基本信息

创建日期:  2007-09-14
使用用户:  50
Github星:  17
插件作者:  Michael Henry

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明


Headerguard - Add header guards to C/C++ header files


It is a common practice to insert header guards into C/C++ header files to
allow a header to be included multiple times. A header guard for file
HeaderName.h typically looks something like this::

#ifndef HEADERNAME_H
#define HEADERNAME_H

...header content...

#endif / HEADERNAME_H /

Headerguard provides methods for inserting and updating header guards, and for
tailoring the header guard style to fit local conventions. It checks for a
pre-existing header guard, and if found, modifies the existing guard in-place.

See documentation in doc/headerguard.txt for installation, customization, and
usage instructions.

Developed by Michael Henry (vim at drmikehenry.com).

Distributed under Vim's license.

Git repository: https://github.com/drmikehenry/vim-headerguard

添加新评论