Casetrate


Ⅰ. 插件描述

Modify the case of identifiers

Ⅱ. 基本信息

创建日期:  2014-12-05
使用用户:  9
Github星:  9
插件作者:  Idan Arye

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

INTRODUCTION

Casetrate is a plugin for changing the case of identifiers. It can change
the case to camelCase, PascalCase, snake_case, UPPER_CASE or Mixed_Case. In
addition, in 'lisp' buffers it can change identifiers' case to lisp-case.

Casetrate supports repeat(https://github.com/tpope/vim-repeat)

USAGE

Use the :Casetrate command to change the case of the word under the cursor.
:Casetrate's argument must be one of the following:

  • "camel" - Change the word under the cursor to camelCase.
  • "pascal" - Change the word under the cursor to PascalCase.
  • "snake" - Change the word under the cursor to snake_case.
  • "upper" - Change the word under the cursor to UPPER_CASE.
  • "mixed" - Change the word under the cursor to Mixed_Case.
  • "lisp" - Change the word under the cursor to lisp-case(only works in

             'lisp' mode).
    

KEYMAPS

If you want Casetrate to create keymaps, you must set g:casetrate_leader to
a prefix of your choice in your |vimrc|. For example, if you set it to:

let g:casetrate_leader = '\c'

You'll get the colloring keymaps:

  • \cc - :Casetrate camel
  • \cp - :Casetrate pascal
  • \cs - :Casetrate snake
  • \cu - :Casetrate upper
  • \cm - :Casetrate mixed
  • \cl - :Casetrate lisp

添加新评论