titlecase.vim


Ⅰ. 插件描述

Convert range or visual to titlecase.

Ⅱ. 基本信息

创建日期:  2002-10-07
使用用户:  1
Github星:  1
插件作者:  Robert KellyIV

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

Sample:
Given:
Change a range or visual to title case, i.e.
":TitleCase<CR>" results in:
Change A Range Or Visual To Title Case, I.E.

This simple changes (via :s) <l (start of word, lowercase a-z) to uppercase. Probably not perfect Titlecase but works good enough for a quickie!

Remaps (with no elegance) <F5> to FeralTitleCase_Visual, change as desired.

Visual method works for single line visuals only, multi line it tries to be clever and makes a mess.. use with caution, single (part of) line works fine though. (needs to have a check that say I don't do multi line visuals!; or only char wise visuals or something).
Range Command (defaults to current line) is:TitleCase
Its small, crude and dirty. But it works :)

Happy VIMing!

添加新评论