Shortcut functions for KeepCase script (


Ⅰ. 插件描述

Makes substitutions using Michael Geddes' KeepCase functions easier

Ⅱ. 基本信息

创建日期:  2005-06-13
使用用户:  1
Github星:  1
插件作者:  Paul Hoepfner-Homme

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin '/shortcut-functions-for-keepcase-script'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

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

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle '/shortcut-functions-for-keepcase-script'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug '/shortcut-functions-for-keepcase-script'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

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

Ⅳ. 文档说明

This is a very simple script that allows you to easily do case-preserving text replacements over an arbitrary range. See vimscript #6 by Michael Geddes for the functions this script depends on.

For example:

:'<,'>call S('building','campus')

will replace all occurrences of "building" with "campus", "BUILDING_ID" with "CAMPUS_ID", "getBuilding" with "getCampus", etc. across the currently selected range.

Also included is the SS(pat,sub) function which uses KeepCaseSameLen for the substitutions instead of KeepCase.

Thanks to Michael Geddes for a great script!

添加新评论