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

Re: undocumented :browse options ? Re: FW: russian translation for vim

Expand Messages
  • Alejandro López-Valencia
    ... As VimL has been out for a number of years, of course changing the behavior now would be a disaster. Yet, this silent echoing of the next command instead
    Message 1 of 22 , May 1, 2004
    • 0 Attachment
      At 06:03 a.m. 01/05/2004, Benji Fisher wrote:
      > >
      > > OK. If browse is a noop, it should behave as such and fail, don't you
      > think?
      >
      > Why should it fail? The point of :browse is that it lets us use
      >GUI widgets to accomplish something that can also be done without them.
      >In the syntax
      >
      >:browse frob
      >
      >what I really want to accomplish is :frob, not :browse, so it should
      >only fail if there is a problem with the :frob command. In other words,
      >:browse is a modifier, like :vertical or :verbose, rather than a
      >command. The appropriate behavior for a noop modifier is to execute the
      >modified command in the ordinary way.
      >
      > If :browse were likely to fail, then anyone using it in a script
      >would be forced to put in code for what to do then.

      As VimL has been out for a number of years, of course changing the behavior
      now would be a disaster. Yet, this silent echoing of the next command
      instead of failing with some sort of exception error makes my mental nose
      twitch a bit. But that's just my nose.


      --
      Alejandro López-Valencia
      http://dradul.tripod.com/
      The limits of my language are the limits of my world.
      (L. Wittgenstein)
    • Edward Peschko
      hey all, just wondering if you can use vim to do mathematical operations on contents of the buffer. ctrl-v (to get the number list) ???? to multiply by 1.3 p
      Message 2 of 22 , May 27, 2004
      • 0 Attachment
        hey all,

        just wondering if you can use vim to do mathematical operations on contents of
        the buffer.

        ctrl-v (to get the number list)
        ???? to multiply by 1.3
        p to paste back.

        sort of an 'excel lite' - don't need anything fancy, but it sure would be helpful
        to increment numbers automatically (without macros) and/or multiply columns without
        going into the shell or resorting to perl..

        thanks,

        Ed
      • Edward Peschko
        ... hmm. that s sort of clunky. as opposed to: ctrl-v (select text to operate on, save in buffer a) ... (get same results) IMO the above syntax is much easier
        Message 3 of 22 , May 28, 2004
        • 0 Attachment
          > aaaaaaa 12 ___
          > aaaaaaa 34 ___
          > aaaaaaa 56 ___
          > aaaaaaa 78 ___
          > ==========================
          > The start column is 10, and the width is 2. so
          > :%s/\%>9c.\{2}/\=( substitute(submatch(0)*13, '\d$', '.&', '') )

          hmm. that's sort of clunky. as opposed to:

          ctrl-v
          (select text to operate on, save in buffer a)
          :opa * 1.3 (or any arbitrary mathematical operation)

          (get same results)

          IMO the above syntax is much easier to use. Magnitudes in fact. I don't know off-hand
          if buffers are integrated into the perl options, but that would be cool too - ie:

          :perl a '$_ * 1.3'

          operating on strings in buffer a would be neat too.

          Ed
        Your message has been successfully submitted and would be delivered to recipients shortly.