How do I pad blanks left or right

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
BOBZ6977
Posts: 2
Joined: Wed Nov 25, 2009 7:28 pm

How do I pad blanks left or right

Post by BOBZ6977 »

:?:
I need the ability to pad the document with a fixed size i.e. 80 characters
per line with blanks Can texpad do this ?
ben_josephs
Posts: 2464
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Add 80 spaces to the end of each line:
Find what: $
Replace with: [80 spaces]

[X] Regular expression

Replace All
To create the 80 spaces:
Create a new document.
Turn on block select mode:
    Configure | Block Select Mode
Go to column 80:
    Search | Go To... | Column 80
Create the spaces:
    <Space>
(If you want to see the spaces: View | Visible Spaces.)
(Turn off block select mode.)
Select the spaces:
    <Shift+Home>
(The satus bar will show: 1 lines, 80 columns selected.)
Copy them:
    <Ctrl+C>
Paste them into the Find what box.
Then chop the lines at column 81:
Turn on block select mode:
    Configure | Block Select Mode.
Go to column 81 in the first line:
    Search | Go To... | Column 81.
Extend the selection a further 80 columns to the right:
    Search | Go To... | Column 161
    [X] Extend selection.
Extend the selection to the last line.
Delete the selection.
(Turn off block select mode.)
BOBZ6977
Posts: 2
Joined: Wed Nov 25, 2009 7:28 pm

Post by BOBZ6977 »

Thank you very much
Post Reply