Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-13 Thread Karl Guertin
I flip between ex commands and macros for semi-automated file conversion and most of what I'd say has been covered, but I'll toss in a personal quirk from my .vimrc. By default, both ` and ' do approximately the same thing in that they jump to a mark (' is a linewise `, it positions the cursor at

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-13 Thread Tim Chase
> Ok. So a possible shortcut to type this could be: >*:%s///&_/gc > Then: yn to accept/reject substitutions. Definitely, if that's good with your workflow. I find it disturbing to jump to another location (triggered by the initial "*") so I tend not to use it, but your way is certainly parsi

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-13 Thread Ivan Vecerina
"Tim Chase" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] : > While editing a file, I decide to rename "someIdentifier" to : > "someIdentifier_" - I will need to append the underscore to : > several (but usually not all) instances of the word. : : The typical way to do this would be

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-12 Thread A.J.Mechelynck
Tim Chase wrote: [...] You can read about ":s"ubstitute commands and the various flags at :help :s :help :s_flags This is a jet-fuel-powered version of search-and-replace that one finds in most editors. The {pattern} portion has an incredible degree of complexity for finding precisely the

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-12 Thread A.J.Mechelynck
Ivan Vecerina wrote: [...] While editing a file, I decide to rename "someIdentifier" to "someIdentifier_" - I will need to append the underscore to several (but usually not all) instances of the word. [...] Here's how I would do that: Let's assume your current directory (as shown by ":pwd") is

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-12 Thread Tim Chase
> Thank you (and Jürgen too), @@ is an easy first step for > me. Glad to have some easy first steps to help you out. >> Alternatively, problems can often be rephrased in terms >> of an Ex command that uses the ":%s" or ":g"/":v" to >> perform changes across the entire file. > > [...] > >> By cha

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-12 Thread Ivan Vecerina
[ again, trying to workaround messy newline conversions ] Thank you (and Jürgen too), @@ is an easy first step for me. Next: "Tim Chase" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] : Alternatively, problems can often be rephrased in terms of an : Ex command that uses the ":%s" or "

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-12 Thread Ivan Vecerina
Thank you (and Jürgen too), @@ is an easy first step for me. Next: "Tim Chase" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] : Alternatively, problems can often be rephrased in terms of an Ex : command that uses the ":%s" or ":g"/":v" to perform changes : across the entire fil

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-09 Thread Tim Chase
> I sometimes want to repeat a sequence of operations > like I would repeat a single command. [cut] > The obvious choice to repeat multiple operations is to record > a macro (for example: qq02r/q ), and replay it with @q. > Unfortunately, '.' after @q only replays the last action > within the macr

Re: Best way to repeat a sequence of keystrokes/commands with a single keypress ?

2007-03-09 Thread Jürgen Krämer
Hi, Ivan Vecerina wrote: > > I sometimes want to repeat a sequence of operations > like I would repeat a single command. > For example, I can repeat with '.' something like: > gI//{is a single operation '.' repeats all} > But I cannot as easily repeat: > 02r/{ '.' will repeat the 2r/ ,