Loading ...
Sorry, an error occurred while loading the content.

Re: perl-like incrementation of characters with

Expand Messages
  • Benji Fisher
    ... After ... follow the link to the nrformats option. (You have to read the short description for both and to get to this part.) If you want
    Message 1 of 2 , Jan 1, 2004
    • 0 Attachment
      On Thu, Jan 01, 2004 at 06:42:11PM +0800, Greg Matheson wrote:
      > Perl allows you to increment variables even if they are not numbers.
      >
      > $x = 'A'; print ++$x # prints 'B'
      >
      > Searching the scripts at www.vim.org on 'increment', 'character'
      > and 'ctrl-a' didn't produce any hits. Is there anything out there
      > for vim doing the same thing, before I start looking atthe perl
      > interface?

      After

      :help CTRL-A

      follow the link to the 'nrformats' option. (You have to read the short
      description for both <C-A> and <C-X> to get to this part.) If you want
      to do something similar from a script, see also

      :help nr2char()
      :help char2nr()

      HTH --Benji Fisher
    Your message has been successfully submitted and would be delivered to recipients shortly.