help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: efficient replacing – really faster compared to using the mouse?


From: Ferdinand
Subject: Re: efficient replacing – really faster compared to using the mouse?
Date: Sat, 11 Aug 2012 13:55:16 +0200

> 
> On Aug 10, 8:21 pm, Ferdinand <Ferdinand.Grueb...@gmx.de> wrote:
>> Here is the specific problem:
>> 
>> I have a html table with a lot of radio buttons.
>> These radio buttons have names (xyz + a number).
>> Now I have to change all the numbers in the following way:
>> 
>> - orignal:
>> ----------
>> 
>> print("<tr>\n");
>> 
>>     ... something else ...
>> 
>>         print("<td class='Button'> <input type='radio' name='xyz23' 
>> value='0'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz23' 
>> value='1'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz23' 
>> value='2'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz23' 
>> value='3'> </td>\n");
>> 
>> print("</tr>\n");
>> 
>> print("<tr>\n");
>> 
>>     ... something else ...
>> 
>>         print("<td class='Button'> <input type='radio' name='xyz54' 
>> value='0'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz54' 
>> value='1'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz54' 
>> value='2'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz54' 
>> value='3'> </td>\n");
>> 
>> print("</tr>\n");
>> 
>> [....]
>> 
>> edited:
>> -------
>> 
>> print("<tr>\n");
>> 
>>     ... something else ...
>> 
>>         print("<td class='Button'> <input type='radio' name='xyz1' 
>> value='0'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz1' 
>> value='1'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz1' 
>> value='2'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz1' 
>> value='3'> </td>\n");
>> 
>> print("</tr>\n");
>> 
>> print("<tr>\n");
>> 
>>     ... something else ...
>> 
>>         print("<td class='Button'> <input type='radio' name='xyz2' 
>> value='0'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz2' 
>> value='1'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz2' 
>> value='2'> </td>\n");
>>         print("<td class='Button'> <input type='radio' name='xyz2' 
>> value='3'> </td>\n");
>> 
>> print("</tr>\n");
> 


Thanks for all the feedback!

Probably, I just have to get used to the replace and search-shortcuts.
I will try it again in emacs and will see how it works out.

What would be perfect in this particular case, would be a search-function that 
lets me edit the replacement-string after each occurrence.

You would search for xyz, toggle through all the occurrences and for each 
occurrence you can type in an individual replacement string.

(like M-% xyz ent 1 spc 1 spc 1 spc 2 spc 2 spc 2 spc 2 …..)


Is there something like this?



thanks again!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]