Notebook
Home page > EMACS > Adding character at the end of each line of region

Adding character at the end of each line of region

Friday 29 October 2010, by Tital

Sometimes I need to convert a list of lines into a tabular in latex. So I need to add "\\" at the end of each line of the considered region.

To do that use the following trick:

- M-% (query replace)
- C-q C-j (^J (line feed)) [you need to valid this choice by a carriage return)
- \\C-q C-j

So we replace line feed (^J get from C-q C-j) by \\ and a line feed.

Note that carraige return is available via C-q C-m

SPIP | template | | Site Map | Follow-up of the site's activity RSS 2.0