Indent character? or RegEx code

General questions about using TextPad

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

Post Reply
User avatar
ineuw
Posts: 191
Joined: Sun Mar 18, 2007 3:23 pm

Indent character? or RegEx code

Post by ineuw »

Is there a RegEx code for indent? Failing that, is there a character which represents the indent? I am trying to search and replace them in documents but found no reference in help and in the forum.
User avatar
Bob Hansen
Posts: 1516
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

Not sure what you mean by "indent" code. TextPad RegEX uses \t for tabs, is that what you want?

Best to provide us with a before and after example of what you are working with and what you want the result to look like.
Hope this was helpful.............good luck,
Bob
User avatar
ineuw
Posts: 191
Joined: Sun Mar 18, 2007 3:23 pm

Post by ineuw »

Bob Hansen wrote:Not sure what you mean by "indent" code. TextPad RegEX uses \t for tabs, is that what you want?

Best to provide us with a before and after example of what you are working with and what you want the result to look like.
Thanks for the speedy response. I proofread and format text using TexPad and am well versed with the use of Regular Expressions in Find and Search and Replace.

I would like to Find the occurrences of \n\n (paragraph breaks) and replace them with \n\n and the indent code assigned to Ctrl+I. Using \n\n\t is not what I am looking for. The indent is necessary because I use the word wrap. (TextPad is set to the Microsoft keyboard compatibility mode.)

Thanks
ManChicken
Posts: 6
Joined: Wed Feb 27, 2008 11:35 pm

Post by ManChicken »

You could do this as a record macro:

Perform a Find
Search for \n$
Turn on 'Regular expression'
Click 'Find Next'
Click 'Close' to close the Find dialog
Press the cursor down key once
Hit Ctrl-I
User avatar
ineuw
Posts: 191
Joined: Sun Mar 18, 2007 3:23 pm

Post by ineuw »

ManChicken wrote:You could do this as a record macro:

Perform a Find
Search for \n$
Turn on 'Regular expression'
Click 'Find Next'
Click 'Close' to close the Find dialog
Press the cursor down key once
Hit Ctrl-I
Many thanks ManChicken.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

I don't understand why a macro should be necessary for this. What are your settings for the document class in
Configure | Preferences | Document Classes | <Class> | Tabulation
or for the current document in
View | Document Properties | Tabulation
?
Can you not find settings there that cause an inserted tab to be converted into whatever you want for your indents?
User avatar
ineuw
Posts: 191
Joined: Sun Mar 18, 2007 3:23 pm

Post by ineuw »

ben_josephs wrote:I don't understand why a macro should be necessary for this. What are your settings for the document class in
Configure | Preferences | Document Classes | <Class> | Tabulation
or for the current document in
View | Document Properties | Tabulation
?
Can you not find settings there that cause an inserted tab to be converted into whatever you want for your indents?
Replacement must be selective and tabs must be retained elsewhere in the document. The change is not universal, so a macro is the way to go. However, my post is altogether unnecessary, and for this I apologize.

I am using TextPad extensively for OCR text formatting, a sort of hybrid word processor. For this, the line wrap is on by default which caused my conceptual misunderstanding. First, the text is cleaned, spell checked and the final text is wikified with MediaWiki code. I also use several word processors for document formatting, and expected certain behaviours to be the same across the board.

Thanks for all the replies.
Post Reply