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

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

Re: Adding String to Beginning of Lines


From: Dante Catalfamo
Subject: Re: Adding String to Beginning of Lines
Date: Thu, 12 Nov 2020 14:01:08 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

The way I would do this would be to make a zero character wide rectangle selection that goes down the left side of the paragraph, and then use string-rectangle to insert the characters.

(starting all the way at the left side)
C-x SPC
(move down to the bottom of the area you want to add the lines to)
C-t
;; +
RET

On 11/10/20 5:43 AM, Christopher Dimech wrote:

I have a paragraph and want to add a string to the beginning of each line after 
selecting
the paragraph region.

GNU is an operating system that is free software—that is, it respects users' 
freedom. The
GNU operating system consists of GNU packages (programs specifically released 
by the GNU
Project) as well as free software released by third parties. The development of 
GNU made
it possible to use a computer without software that would trample your freedom.

Example, passing ';; + ' as argument to a function to get

;; + GNU is an operating system that is free software—that is, it respects 
users' freedom. The
;; + GNU operating system consists of GNU packages (programs specifically 
released by the GNU
;; + Project) as well as free software released by third parties. The 
development of GNU made
;; + it possible to use a computer without software that would trample your 
freedom.






reply via email to

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