Ⅰ. 插件描述
Dash text-object for VimⅡ. 基本信息
|
Ⅲ. 安装方法
使用Vundle管理器安装
在你的.vimrc下添加:Plugin 'ryanmcg/vim-textobj-dash'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall
对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。
使用NeoBundle管理器安装
在你的.vimrc下添加:NeoBundle 'ryanmcg/vim-textobj-dash'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall
使用VimPlug管理器安装
在你的.vimrc下添加:Plug 'ryanmcg/vim-textobj-dash'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall
使用Pathogen管理器安装
在终端中运行以下命令:cd ~/.vim/bundle
git clone https://github.com/ryanmcg/vim-textobj-dash
Ⅳ. 文档说明
Introduction
The textobj-dash plugin provides two new text-objects which are
triggered by a- and i- respectively. You can use them when you have to
deal with the following type of words:
- foo-baz-bar
Now, suppose you have to change bar to qux (* for cursor position). You can
do the following:
foo-b*az-bar and type ci- to get foo-*-bar. Or you can type da- to getfoobar
Installation
I strongly recommend installing pathogen.vim.
cd ~/.vim/bundle
git clone git://github.com/lucapette/vim-ruby-doc.git
Or you can unzip it in your ~/.vim directory. The plugin depends on the awesome
vim-textobj-user by
kana. So you need to install it in order to use
this plugin.
Credit
All credit goes to Luca Pette and
kana. This plugin is a basic rip off of
vim-textobj-underscore
where all underscores (_) are changed to dashes (-).
Copyright
Copyright © Ryan McGowan. Distributed under the same terms as Vim itself.