Convert do end block to curly braces and vice versa

52 views
Skip to first unread message

Ivan Osadchii

unread,
Jul 15, 2011, 8:39:42 AM7/15/11
to emacs-o...@googlegroups.com
Hi All

I often find myself converting code like this:

before do 
  :something
end

to 

before { :something }

Is there a way to automate it in emacs? Yep, googling didn't help :(

Thanks!

Steve Purcell

unread,
Jul 15, 2011, 2:59:24 PM7/15/11
to emacs-o...@googlegroups.com


Not sure. I bet that if you ask that question on stackoverflow, you'll get some
excellent answers.

-Steve

Ivan Osadchii

unread,
Jul 15, 2011, 3:18:01 PM7/15/11
to emacs-o...@googlegroups.com

ddoherty03

unread,
Apr 19, 2012, 8:38:45 AM4/19/12
to emacs-o...@googlegroups.com
I was able to get a keyboard macro to do this with a little fiddling.  So record one, name it, save it, and bind it to a key in your init.el file.
Reply all
Reply to author
Forward
0 new messages