vim-smart-selection


Ⅰ. 插件描述

smart selection is a plugin for users to select a block of codes according to the syntax (for C family languages)

Ⅱ. 基本信息

创建日期:  2013-10-29
使用用户:  2
Github星:  0
插件作者:  Tianyu Cheng

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

_ _

/  ___|                    | |   /  ___|    | |         | | (_)            
\ `--. _ __ ___   __ _ _ __| |_  \ `--.  ___| | ___  ___| |_ _  ___  _ __  
 `--. \ '_ ` _ \ / _` | '__| __|  `--. \/ _ \ |/ _ \/ __| __| |/ _ \| '_ \ 
/\__/ / | | | | | (_| | |  | |_  /\__/ /  __/ |  __/ (__| |_| | (_) | | | |
\____/|_| |_| |_|\__,_|_|   \__| \____/ \___|_|\___|\___|\__|_|\___/|_| |_|

                                                                       

===========================================================================

1.Overview smart-selection

Smart Selection is a plugin for vim, allow users to select and edit a block of codes according to the code environment. Is also support the operator mode so that it is possible to integrate with the built-in motion such as d, y and c, etc.

Currently under development.

  1. Usage

    Smart Selection is currently written to facilitate range selection in C-like languages.
    It judges the closest range by looking at ', ", [, (, {, etc

    <leader>a turn the closest range into visual mode

    <leader><leader> a turn the closest range into selection mode

    <operator>a do the previous operation using the closest range

  2. Remapping

    variables
    g:smart_visual_mode_map originally mapped as <leader>a
    g:smart_selection_mode_map originally mapped as <leader><leader>a
    g:smart_operator_mode_map originally mapped as <operator>a

  3. Installing

If you use Vundle or NeoBundle, add

Bundle "tycheng/vim-smart-selection" (for Vundle)
then :BundleInstall to install

NeoBundle "tycheng/vim-smart-selection" (for NeoBundle)
then :NeoBundleInstall to install

others: copy the files into the plugin directory

  1. Improvement

If there are any bugs or some particular functions you hope to add to this plugin, please contact me by skysource.tony@gmail.com

by Tianyu Cheng

添加新评论