Ⅰ. 插件描述
smart selection is a plugin for users to select a block of codes according to the syntax (for C family languages)Ⅱ. 基本信息
|
Ⅲ. 安装方法
使用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.
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
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>aInstalling
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
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