I have the following data
Food $44
Transport $52
Rentals $102
...
I want to transform to the following
Food $44
Transport $52
Rentals $102
...
Is there any in-built function in Emacs to do this? I'm not familiar with elisp. Thanks.
Several possibilities. The easiest is probably C-u M-x align. See
http://www.emacswiki.org/emacs/AlignCommands
The other possibility is to use table-mode. Just do M-x table-capture, use one space as column and newline (C-q C-j) as row delimiter. Afterwards, you can use M-x table-release do get rid of the lines. For more information, see
http://www.emacswiki.org/emacs/TableMode
(and the Emacs manual, of course).
One of the emacs align commands should do the job.
Start with C-u M-x align
after selecting the region you want to line up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With