smartword


Ⅰ. 插件描述

Vim plugin: Smart motions on words

Ⅱ. 基本信息

创建日期:  2008-12-02
使用用户:  121
Github星:  44
插件作者:  Kana Natsuno

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

smartword is a Vim plugin to provide {motion}s on |word|s which are smarter
than the built-in ones in some sense.  For example, |w| moves the cursor to
the next word as follows (here "#" means a position to which |w| moves the
cursor for each time):

<a target="_blank" rel="nofollow" href="http://www.vim.org/">www.vim.org</a>;
 # #   # #   #  #  ##  ##  #  #  ##  ##  # #

Because there are two types of words and |w| moves to the next word which can
be the both types.  Let's call "L" for a type of words and "P" for another
type of words, where "L" means a word which consists of a sequence of letters
(which are defined by 'iskeyword' option) and "P" means a word which consists
of a sequence of other non-blank characters.

In many cases, you might want to move to the next "L", not "P".  This plugin
provides {motion}s to behave so.  For example, |<Plug>(smartword-w)| which is
corresponding to |w| moves the cursor as follows:

<a target="_blank" rel="nofollow" href="http://www.vim.org/">www.vim.org</a>;
 # #     #      #   #   #     #   #   #    #

See also |smartword-examples| for customization.

See also the following image if the above figures aren't correctly displayed:
http://gyazo.com/bc7887d9bb0f6aa3eee1e67b0d756b2e.png

Requirements:

  • Vim 7.2 or later

Latest version:
http://github.com/kana/vim-smartword

Document in HTML format:
http://kana.github.com/config/vim/smartword.html

添加新评论