sponsor Vim development Vim logo Vim Book Ad

smartword : Smart motions on words

 script karma  Rating 67/21, Downloaded by 2201  Comments, bugs, improvements  Vim wiki

created by
Kana Natsuno
 
script type
utility
 
description
*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 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 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
 
install details
...
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-smartword-0.0.2.zip 0.0.2 2009-01-23 7.0 Kana Natsuno - Fix the document a bit.
- Revise the treatment on 'iskeyword'.
- Fix 2 bugs on |<Plug>(smartword-e)| and |<Plug>(smartword-ge)| with |o_v|.  These bugs are appeared only in Vim with the patch (*).
vim-smartword-0.0.1.zip 0.0.1 2008-12-06 7.0 Kana Natsuno - Fix |<Plug>(smartword-e)| and |<Plug>(smartword-ge)| to be
  |inclusive| as same as |e| and |ge|.
vim-smartword-0.0.0.zip 0.0.0 2008-12-05 7.0 Kana Natsuno Initial upload
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github