[prev in list] [next in list] [prev in thread] [next in thread]
List: vim-dev
Subject: Re: arguments to mappings (was buffer sizes)
From: "Antoine J. Mechelynck" <antoine.mechelynck () belgacom ! net>
Date: 2005-02-19 21:42:10
Message-ID: 4217B2B2.6040603 () belgacom ! net
[Download RAW message or body]
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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic