[Ilugc] adding brackets in emacs
- From: rmathews@xxxxxxxxx (Roshan Mathews)
- Date: Sat Nov 10 12:30:33 2007
On 11/10/07, Kenneth Gonsalves <lawgon@xxxxxxxxxxxxxxx> wrote:
a common task is adding strings for i18n. Say I have a string -
mystring. I need to mark it like so:
_("mystring"). What I want to do is: select the string and press a
key so it will mark it. How is this done in emacs?
Hmmm ... I'm assuming you have the string in a buffer/file and need to
convert it from:
foo
to:
_("foo")
You can use keyboard macros for this. Unless you are going to be
using this often, in which case you can use the function given.
C-x ( start defining the macro
C-x ) stop defining
C-x e to use it
M-x apply-macro-to-region-lines ...
--
Roshan Mathews
Other related posts: