vim-name_object_after_its_type


Ⅰ. 插件描述

Vim editor plugin to name an object after its type

Ⅱ. 基本信息

创建日期:  2014-12-13
使用用户:  1
Github星:  1
插件作者:  Shane Harper

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'shaneharper/vim-name-object-after-its-type'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'shaneharper/vim-name-object-after-its-type'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'shaneharper/vim-name-object-after-its-type'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

vim-name_object_after_its_type

A vim editor plugin that can save some typing when naming an object in programming languages such as C++.

The plugin creates an insert mode mapping for uu to insert a name based on the preceding type name.

An example:

To enter "SourceLocation source_location;" type "SourceLocationuu;".

Type names can be "CamelCase", "camelCase" or "Starts_with_a_capital". Object names are "lower_case_words_separated_by_underscores".

Where there is only one instance of a class in a particular scope it may make sense to name the object after the name of its type instead of inventing some other name.

Another example:

To enter "SpaceStation mars_space_station;" type "SpaceStationuu;<Ctrl-o>bmars_".

Vundle or Pathogen can be used to install this plugin.

添加新评论