Indenting only one line

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
Richard Baldwin
Posts: 2
Joined: Wed May 28, 2003 9:32 pm
Contact:

Indenting only one line

Post by Richard Baldwin »

I want to indent only the first line of each paragraph (as old fashioned as this may be).
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

It sounds like you need a word-processor not a text editor but, seeing as you ask, do a find and "replace all"
Search for
\n[^\t]
Replace with
\n\t
with "Regular Expression" box ticked
Go to the start of the file (Ctrl-Home) and put a tab there if there is not one.
Richard Baldwin
Posts: 2
Joined: Wed May 28, 2003 9:32 pm
Contact:

Index first line

Post by Richard Baldwin »

This is quite over my head but I shall try my best.
Thank you!
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Search for
\n[^\t]
Replace with
\n\t
Not a good idea - it looses the first character.
Better:
search for

Code: Select all

\n\([^\t]\)
replace by

Code: Select all

\n\t\1
Ed
Posts: 103
Joined: Tue Mar 04, 2003 9:09 am
Location: Devon, UK

Post by Ed »

:oops: oops! You're right Andreas
Post Reply