Page 1 of 1

How do I pad blanks left or right

Posted: Wed Nov 25, 2009 7:44 pm
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 ?

Posted: Wed Nov 25, 2009 10:06 pm
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.)

Posted: Mon Nov 30, 2009 12:45 pm
by BOBZ6977
Thank you very much