I searched around for the answer but couldn't find it, so thanks for any
help.
--
: Derick
----------------------------------------------------------------
":goto" will always count by bytes, but there's another way to do it:
:set ww+=s ve=onemore
:exe "normal gg" . (char_number - 1) . " "
don't forget the space at the end. When doing it at the keyboard you may
type just gg then the number (one less than the desired character
number) followed by a space: "exe 'normal'" is not necessary in that case.
see
:help 'whichwrap'
:help 'virtualedit
The ":set virtualedit=onemore" is necessary to count linebreaks (but
each of them as only one character even on Windows). That option value
doesn't exist in Vim 6 or earlier.
You can check the result with the Normal-mode command g Ctrl-G
Best regards,
Tony.
--
It is illegal for anyone to give lighted cigars to dogs, cats, and other
domesticated animal kept as pets.
[real standing law in Illinois, United States of America]
You would in any case have had to either type the character-count
manually, or (in a script) get it from a variable. Manually, it's
usually just as many keypresses (and sometimes one less) to type "one
less than the number". Prefix that by gg and postfix that by one hit on
the spacebar and you're done (assuming that the correct settings are set
once and for all).
In a script, you can write the appropriate ex-commands where you need to
use them; or if you need them at several places in various scripts, you
can define a user-command or function and invoke that.
>
> [TMI, I never received your response, I'm having to use the Google
> Groups interface to read and reply, even though I subscribed.]
Make sure your Google Groups are set to forward all group posts to your
email address. If you use a gmail address, set it up for POP (or IMAP
but personally I prefer POP).
Best regards,
Tony.
--
It's always darkest just before it gets pitch black.