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

buffer sizes

Expand Messages
  • Edward Peschko
    I wanted to make a macro that takes numeric arguments, ie: map s :Ide step Is it possible to do this such that s s would step ten times in the
    Message 1 of 5 , Feb 18 9:28 PM
    • 0 Attachment
      I wanted to make a macro that takes numeric arguments, ie:

      map s :Ide step <num><CR>

      Is it possible to do this such that 's<num>s' would step ten times
      in the debugger?

      Ed

      (ps - idevim is a beautiful piece of work, btw. I've just made a couple
      of mods and macros to have it fit my coding style, and it already
      is turning out to be a lifesaver.

      Is vim7.0 going to have something like this integrated into it?
      )
    • Antoine J. Mechelynck
      ... thus :St 10 would expand to :Ide step 10 . Or if I misunderstood your purpose, then maybe a user-command would suit you. See ... HTH,
      Message 2 of 5 , Feb 19 12:07 AM
      • 0 Attachment
        Edward Peschko wrote:
        > I wanted to make a macro that takes numeric arguments, ie:
        >
        > map s :Ide step <num><CR>
        >
        > Is it possible to do this such that 's<num>s' would step ten times
        > in the debugger?
        >
        > Ed
        >
        > (ps - idevim is a beautiful piece of work, btw. I've just made a couple
        > of mods and macros to have it fit my coding style, and it already
        > is turning out to be a lifesaver.
        >
        > Is vim7.0 going to have something like this integrated into it?
        > )
        >
        >
        >
        I think that what you want to do is define an abbreviation:

        :cabbrev St Ide step

        thus ":St 10<Enter>" would expand to ":Ide step 10<Enter>".

        Or if I misunderstood your purpose, then maybe a user-command would suit
        you.

        See
        :help abbreviations
        :help user-commands

        HTH,
        Tony.
      • Edward Peschko
        ... No, what I wanted to do was redefine s (in normal mode) to be step . I basically want the least amount of keystrokes to move around in the code.. s to
        Message 3 of 5 , Feb 19 1:16 PM
        • 0 Attachment
          > > map s :Ide step <num><CR>
          > >
          > >Is it possible to do this such that 's<num>s' would step ten times
          > >in the debugger?
          > >
          > >Ed
          > >
          > >(ps - idevim is a beautiful piece of work, btw. I've just made a couple
          > > of mods and macros to have it fit my coding style, and it already
          > > is turning out to be a lifesaver.
          > >
          > > Is vim7.0 going to have something like this integrated into it?
          > >)
          > >
          > >
          > >
          > I think that what you want to do is define an abbreviation:
          >
          > :cabbrev St Ide step
          >
          > thus ":St 10<Enter>" would expand to ":Ide step 10<Enter>".
          >
          > Or if I misunderstood your purpose, then maybe a user-command would suit
          > you.

          No, what I wanted to do was redefine s (in normal mode) to be 'step'.
          I basically want the least amount of keystrokes to move around in
          the code.. 's' to step seemed reasonable - as did 's10s' to step 10 times.

          The first is easy, the second is what I'm trying to figure out how to
          do.

          Ed
        • Antoine J. Mechelynck
          ... You might want to avoid clashing to existing commands: s in normal mode means delete and start insert , see :help s . In Vim debugging mode, s already
          Message 4 of 5 , Feb 19 1:42 PM
          • 0 Attachment
            Edward Peschko wrote:
            >>> map s :Ide step <num><CR>
            >>>
            >>>Is it possible to do this such that 's<num>s' would step ten times
            >>>in the debugger?
            >>>
            >>>Ed
            >>>
            >>>(ps - idevim is a beautiful piece of work, btw. I've just made a couple
            >>> of mods and macros to have it fit my coding style, and it already
            >>> is turning out to be a lifesaver.
            >>>
            >>> Is vim7.0 going to have something like this integrated into it?
            >>>)
            >>>
            >>>
            >>>
            >>
            >>I think that what you want to do is define an abbreviation:
            >>
            >> :cabbrev St Ide step
            >>
            >>thus ":St 10<Enter>" would expand to ":Ide step 10<Enter>".
            >>
            >>Or if I misunderstood your purpose, then maybe a user-command would suit
            >>you.
            >
            >
            > No, what I wanted to do was redefine s (in normal mode) to be 'step'.
            > I basically want the least amount of keystrokes to move around in
            > the code.. 's' to step seemed reasonable - as did 's10s' to step 10 times.
            >
            > The first is easy, the second is what I'm trying to figure out how to
            > do.
            >
            > Ed
            >
            >
            >
            You might want to avoid clashing to existing commands: s in normal mode
            means "delete and start insert", see ":help s".

            In Vim debugging mode, s already means "step". Normal-mode commands are
            not accessible here. You can also repeat the last command (if it was a
            debugging command) with just <Enter>. To step over several statements,
            you may want to set a breakpoint and "continue" instead -- see
            :help debug-scripts
            :help debug-mode
            :help :debug
            :help >cont
            :help >step
            :help :breakadd

            Best regards,
            Tony
          • Edward Peschko
            ... well, yes I realize that s means delete and start insert ; however, when I m running gdb I m not very likely to be editing the buffers in which I m
            Message 5 of 5 , Feb 19 2:58 PM
            • 0 Attachment
              > >
              > >No, what I wanted to do was redefine s (in normal mode) to be 'step'.
              > >I basically want the least amount of keystrokes to move around in
              > >the code.. 's' to step seemed reasonable - as did 's10s' to step 10 times.
              > >
              > >The first is easy, the second is what I'm trying to figure out how to
              > >do.
              > >
              > >Ed
              > >
              > >
              > >
              > You might want to avoid clashing to existing commands: s in normal mode
              > means "delete and start insert", see ":help s".

              well, yes I realize that s means 'delete and start insert'; however, when
              I'm running gdb I'm not very likely to be editing the buffers in which I'm
              running. In the unlikely case that I am going to edit, I'll simply unmap
              the commands instead. The less keystrokes necessary to do stuff, the faster
              I am.

              And I'm not debugging vim scripts, I'm debugging c code, using the idevim
              plugin to have vim interact with gdb. I got it from:

              http://vim.sourceforge.net/scripts/download_script.php?src_id=428

              and like I said, its a lifesaver; although I really would much rather have
              it be implemented in terms of a shell embedded inside of a vim window,
              with the motions of the top, code viewing window being determined by the
              text displayed inside the lower, gdb-running window. That way, plugins
              for the perl debugger, the python debugger, php, etc. could easily be made.

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