sponsor Vim development Vim logo Vim Book Ad

keywords.vim : mappings to move and quote iskeyword text

 script karma  Rating 7/4, Downloaded by 645    Comments, bugs, improvements  Vim wiki

created by
Anders Thøgersen
 
script type
utility
 
description
This scripts provides two functionalities that use the iskeyword setting of
the current buffer.

The following mappings are provided for moving keywords in normal mode:

    <C-Up>   : exchange the current keyword with the previous one.
    <C-Down> : exchange the current keyword with the next one.

These mappings can be changed by changing the value of the following variables.

    let g:keywords_MoveWordL = '<C-Up>'
    let g:keywords_MoveWordR = '<C-Down>'

Also there exists mappings for adding/deleting "quotes" to/from a keyword or a
visually selected area. The mappings are as follows:

   qw, q"  : double quote
   qs, q'  : single quote
   qe, q`  : quote execute
   q[, q]  : quote with square brackets
   q{, q}  : quote with brackets
   q(, q)  : quote with parantheses
   q<, q>  : quote with xml style tag.

If you wish to provide a different map leader than 'q' use this variable:

   let g:keywords_MapLeader = 'q'

There is one normal mode mapping for removing quotes from a keyword:

   wq  :  removes non iskeyword material around the current keyword.

Consider sending an email if you have any comments or suggestions :-)
 
install details
put this script into the vim plugin directory or source it from within vim
 

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
keywords.vim 0.2 2005-05-27 6.0 Anders Thøgersen Discovered a small bug.
keywords.vim 0.1 2005-05-27 6.0 Anders Thøgersen Initial upload
ip used for rating: 50.17.79.35

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.
   
SourceForge.net Logo