I have a text file with some sample content as shown here:
Sno = 1p
Sno = 2p
Sno = 3p
What i want is to remove the p
from each of the columns.
With this intention i write a macro:
M-x //go to buffer
C-x (//start the macro
C-s = // search for equalto sign
RET C-f C-f // reach to te alphabet 'p'
DEL // Delete
C-n C-x )//go to new line and Close the macro definition
C-x e
Pressing e
twice will remove p
, but in case i want to do the same stuff till the end of file, how can i do it i can't keep pressing e
if i have 20000 such lines. What should be done??
Please donot suggest regex, as this is a sample example, not the actual case.
Please donot suggest any elisp, i am comfortable with remembering shortcutf for emacs.
question from:
https://stackoverflow.com/questions/7540224/running-a-macro-till-the-end-of-text-file-in-emacs 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…