sponsor Vim development Vim logo Vim Book Ad

cream-vimabbrev : Convert Vim script command and option names between full and abbreviated forms

 script karma  Rating 13/4, Downloaded by 1332  Comments, bugs, improvements  Vim wiki

created by
Steve Hall
 
script type
utility
 
description

*** WARNING! ***
This script is very much a work in progress and has several known bugs and likely many unknown ones. You will find little automatic success with it. It is being provided here for information only. Be hereby warned that using these functions will tear valid Vim script limb from limb leaving a trail of crying and gnashing of teeth behind.

That said, we would very much appreciate your feedback on correcting said anamolies. Feel free to forward suggestions or fixes to:
  digitect (at) mindspring • com


Description:

This script is currently one half of a set of functions to convert Vim command and option names between short/abbreviated and long/full name forms. (Ex. "fu" => "function", "e" => "edit") These are sometimes indicated like "fu[nction]" or  "e[dit]".

The script currently only converts from short to long. Based on my own preferences, I am less motivated to do the other side. ;) But I conceed it would be useful to have a polished routine to help going back and forth between the two for those with preferences for either readability or bandwidth conservation.

The script contains plenty of working debris at the bottom which shouldn't impact the code above. I have tried to be as complete as possible by using Vim's own syntax and option lists to compile the substitutions from. However you may notice omissions.

Dependancies:

multvals.vim (http://www.vim.org/script.php?script_id=171)
  by Hari Krishna Dara, for the arrays of items to be substituted.

ToDo:

* Avoid mapping syntaxes.
* Avoid heinous "normal af|g^" => "normal af|global^" error
* Avoid heinous "normal j+r" => "normal j+read" error
* Add whitespace separators around evaluation operators and concatenation symbols.


This is one of many custom utilities and functions for gVim from the Cream project (http://cream.sourceforge.net), a configuration of Vim for those of us familiar with Apple and Windows software.

 
install details

Just drop this file into your plugins directory, make sure you have the required dependencies (multvals.vim) also there, and start Vim. Then call the functions Cream_vimshort2long() and Cream_vimlong2short() from within the file to be converted.
 

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
cream-vimabbrev.vim 0.1 2002-11-04 6.0 Steve Hall Initial upload
ip used for rating: 54.166.141.52

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