Search/Replace problem

General questions about using TextPad

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

Post Reply
gcotterl
Posts: 248
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Search/Replace problem

Post by gcotterl »

The "Find what" string contains any character(s)
The "Replace with" string contains spaces (i.e., made by pressing the spacebar)

Under "Conditions", only "Text" is selected
Under "Scope" only "Active Document" is selected

When I click "Replace", "Replace Next" or "Replace All", the found string is replaced with tab characters (i.e., \t ) instead of with spaces.

What am I doing wrong?
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Clear
Configure | Preferences | Document Classes | <Class> | Tabulation | Convert new tabs to spaces
or, for the current document,
View | Document Properties | Tabulation | Convert new tabs to spaces

Edit:
I was wrong.
a. I had it the wrong way round (it should have been Set not Clear.)
b. I can't reproduce the reported effect anyway.
Sorry.
Last edited by ben_josephs on Sat Jul 16, 2022 4:17 pm, edited 1 time in total.
gcotterl
Posts: 248
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

In the Configure step, under what <Class> do I find the Tabulation menu?
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

All of them. Use the one(s) for whichever class(es) you want to apply that setting.
gcotterl
Posts: 248
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

None of the Document Classes have a Tabulation category.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

In Configure | Preferences do you not see a tree like this:

Code: Select all

|- General
|- File
|- Editor
|- View
v· Document Classes
|  v· Default
|  |  |- Colors
|  |  |- Font
|  |  |- Printing
|  |  |- Syntax
|  |  |- Tabulation
|  >· Binary
...
?
gcotterl
Posts: 248
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

Now, I see it

Code:
|- General
|- File
|- Editor
|- View
v· Document Classes
| v· Default
| | |- Colors
| | |- Font
| | |- Printing
| | |- Syntax
| | |- Tabulation
| >· Binary

On the Tabulation page:
The Default tab spacing value = 8
The Indent size = 8
The Convert new tabs to spaces is not ticked
The Convert existing tabs to spaces when saving files is not ticked.
The Tab stops boxes are empty.
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

I was wrong.
a. I had it the wrong way round (it should have been Set not Clear.)
b. I can't reproduce the reported effect anyway.
Sorry.
gcotterl
Posts: 248
Joined: Wed Mar 10, 2004 8:43 pm
Location: Riverside California USA

Post by gcotterl »

If my document contains tab characters (\t), I want to retain the tabs.

Why would I tick ("set") "Convert new tabs to spaces".

Will that prevent tab characters when replacing the "Find What" term with spaces?
Post Reply