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

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

putting double quotes efficiently


From: C K Kashyap
Subject: putting double quotes efficiently
Date: Mon, 3 Jun 2013 11:13:02 +0530

Hi,
I am looking for a way to transform

print line1
print line two
print line3

into

print "line1";
print "line two";
print "line3";

most efficiently. For the first quote of each line I place the cursor
before line1 and I set the mark and then move all the way down to just
before line3 and then do a C-x-r-t " <RET>
Then I do a regexp replace to change $ to ";

I'd like to do better. While at it, can I please also know how I can use
the line range in the mark set mode in user defined function?

Regards,
Kashyap


reply via email to

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