I've had time to explore visincr.vim in detail today. As a result,
please disregard both my questions below.
For question 2, zfill IS a leading pad. I misunderstood this at first.
For question 1, I now understand why the default zfill is set to a space
" " character. It's because the default :II behavior of right-aligning
numbers should be apparent, by padding spaces. Since I'd like to change
this default, I've modified the line in visincr.vim:
let zfill= ' '
to become
let zfill= ''
Now I can use :II if I don't wish to pad anything to the numbers. I can
also specify zfill should I need a right-align, but that is rare.
I have a new question:
When trying to do :IDMY, I find that I am missing both these functions
Jul2Cal()
Cal2Jul()
AFAIK, there doesn't seem to be any extra required plugin file to run
visincr.vim. Is something missing?
Thanks :)
--
Gerald
---------- Forwarded message ----------
Date: Wed, 7 Jun 2006 23:18:38 -0700 (PDT)
From: Gerald Lai <[EMAIL PROTECTED]>
To: Charles E Campbell Jr <[EMAIL PROTECTED]>
Cc: [email protected]
Subject: Re: Changing a long list of entries with corresponding index
On Wed, 7 Jun 2006, Charles E Campbell Jr wrote:
Gerald Lai wrote:
Visincr pads trailing spaces as the number of characters needed to
represent the end number increases. What I mean is, for the above
example, we will be left with:
cities[0 ] = ...
.
.
cities[2039] = ...
Could it be made to pad nothing? Or, in addition, even leading
zeros/spaces/other characters?
Also, are there plans for incrementing/decrementing hex & octal?
As of v13, a zfill of '' or "" will work to "pad nothing":
:[visual-block range]II 1 ""
You may use other characters, too.
As of v14b, the :IX (and :IIX) commands do hexadecimal incrementing.
I haven't done octal (yet). Guess that'll be :[visual-block range]IO (and
IIO).
Version v14b is available at my website:
http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
as "Visual Incrementing".
Thanks! I'll install it on my next update cycle. Keep up the good work
:)
1. Can (and should) zfill be made into a global option? I'd imagine most
people would prefer to "pad nothing".
2. How about leading zfills? For example:
cities[0000] = ...
cities[0001] = ...
.
.
cities[2039] = ...
--
Gerald