项目作者: tenfyzhong

项目描述 :
add type cast surrouding.
高级语言: Vim script
项目地址: git://github.com/tenfyzhong/typecast.vim.git
创建时间: 2018-09-26T07:08:09Z
项目社区:https://github.com/tenfyzhong/typecast.vim

开源协议:MIT License

下载


typecast.vim

Build Status
GitHub tag
doc

Typecast is a plugin to add type cast surrouding.

support repeat.vim.

Screenshots

screenshot

Install

I suggest you to use a plugin manager, such vim-plug or other.

  • vim-plug

    1. Plug 'tenfyzhong/typecast.vim'
  • Manual

    1. git clone https://github.com/tenfyzhong/typecast.vim.git ~/.vim/bundle/typecast.vim
    2. echo 'set rtp+=~/.vim/bundle/typecast.vim' >> ~/.vimrc
    3. vim -c 'helptag ~/.vim/bundle/typecast.vim/doc' -c qa!

Usage

normal mode

Type <leader>ct(default mapping) and a motion, and then it will prompt to
input a type. It will add type(**) to surround the motion selected words.
** is the motion selected words.

visual mode

Select the words to cast, and then type <leader>ct(default mapping).

Mapping

<Plug>typecast
Trigger the type casting. Support normal and visual mode. In the normal mode,
it will wait a motion to surround with (). In the visual mode, it will
surround the selected words.

default mapping:

  1. nmap <leader>ct <Plug>typecast
  2. xmap <leader>ct <Plug>typecast