Loading ...
Sorry, an error occurred while loading the content.

Re: [NTB] eliminating leading spaces

Expand Messages
  • Jason Waugh
    ... I usually do search and replace on ^P followed by space repeatedly until there are no more... You might want to try a regexp, though. Check the Regular
    Message 1 of 8 , Aug 3, 2001
    • 0 Attachment
      On 03/08/2001 at 5:20 PM jan85@... wrote:
      >I want to know if there is an easy way to automatically eliminate leading
      >spaces, preferably without using a clip?



      I usually do search and replace on ^P followed by space repeatedly until there are no more...

      You might want to try a regexp, though. Check the Regular Expression box and put the following in the search/replace fields:

      search for: ^\s*
      replace with: (leave this field blank to replace with nothing.)


      I just tested this and it works well, and is a far better solution than the ^Pspace one.


      Thanks,
      Jason Waugh.
    • Jim Hall
      Jan, ... Highlight the text & select MODIFY ALIGNMENT LEFT ALIGN or pick it from the tool bar or context menu if you have it turned on in either of those.
      Message 2 of 8 , Aug 3, 2001
      • 0 Attachment
        Jan,
        At 05:20 PM 8/3/01 -0400, you wrote:
        >I want to know if there is an easy way to automatically eliminate leading
        >spaces, preferably without using a clip?


        Highlight the text & select MODIFY>ALIGNMENT>LEFT ALIGN or pick it from the
        tool bar or context menu if you have it turned on in either of those.


        Regards,

        Jim
      • jan85@usa.net
        ... Thanks Jim, it worked like a charm. This is another tool that I can now use to fix poorly formatted email that will be converted to HTML and placed on a
        Message 3 of 8 , Aug 3, 2001
        • 0 Attachment
          On Fri, 03 Aug 2001 17:22:30 -0700, Jim Hall wrote:

          >At 05:20 PM 8/3/01 -0400, Jan wrote:
          >>I want to know if there is an easy way to automatically eliminate leading
          >>spaces, preferably without using a clip?
          >
          >
          >Highlight the text & select MODIFY>ALIGNMENT>LEFT ALIGN or pick it from the
          >tool bar or context menu if you have it turned on in either of those.

          Thanks Jim, it worked like a charm. This is another tool that I can now
          use to fix poorly formatted email that will be converted to HTML and
          placed on a web site.

          Some of the other "tools" I use often are: Modify | Lines | Join Lines,
          Modify | E-mail | Unquote Text, and a small clip I wrote to modify and
          remove some header information that is generated by a mailing list.

          Notetab Pro is great and I use it as both a text editor and HTML editor.
          It is one of my top 3 programs ( the other 2 are Agent & EZ Viewer) and
          all are either small companies or one-man-shows. The support is excellent
          and this list is worth its weight in gold.

          The only limitation I find in the Pro version that I run into from
          time-to-time is the 32K paragraph size limitation. It sometimes appears
          when I attempt to select a large amount of text for the Join Lines
          function. Hopefully, the new input control in version 5 will take care of
          this minor annoyance.

          Jan

          --
          Jan Rosenstreich - mystic@...
          Independent Distributor #130-646
          Multi-Pure Water Filtration Systems
          http://www.castle.net/~mystic/pages/multintr.html
        • Jody
          Hi Jan, ... I don t remember what shape the Library is in, but try out my ReFormat Library. It was specially made for eMail. You can probably customize the
          Message 4 of 8 , Aug 3, 2001
          • 0 Attachment
            Hi Jan,

            >Some of the other "tools" I use often are: Modify | Lines | Join
            >Lines, Modify | E-mail | Unquote Text, and a small clip I wrote
            >to modify and remove some header information that is generated by
            >a mailing list.

            I don't remember what shape the Library is in, but try out my
            ReFormat Library. It was specially made for eMail. You can
            probably customize the Clips for your own needs. (I normally
            reformat my mail with NoteTab, but remotely so to speak in my
            mail program. I use the PasteBack feature plus quits a bit of
            code to do it, because I also keep my FAQ's in it so I can have
            them pasted into my eMail very easily.

            Try http://www.notetab.net/zip/reformat.zip

            I am not sure if it is own my Libraries page or not.

            >The only limitation I find in the Pro version that I run into
            >from time-to-time is the 32K paragraph size limitation. It
            >sometimes appears when I attempt to select a large amount of text
            >for the Join Lines function. Hopefully, the new input control in
            >version 5 will take care of this minor annoyance.

            I hope so too. ;) I can usually find a work-around though.

            Happy NoteTab'n,
            Jody Adair

            The NoteTabbers Assistant Page
            http://www.notetab.net

            The NoteTab Basic Discussion List
            mailto:NoteTab-Subscribe@yahoogroups.com
            mailto:NoteTab-UnSubscribe@yahoogroups.com
            http://www.egroups.com/group/notetab
          • jan85@usa.net
            ... The only work-around I found after the error message (and the mangling of some text) is to go back to the last disk copy and select less text at a time
            Message 5 of 8 , Aug 4, 2001
            • 0 Attachment
              On Sat, 03 Aug 2001, Jan wrote:

              >>The only limitation I find in the Pro version that I run into
              >>from time-to-time is the 32K paragraph size limitation. It
              >>sometimes appears when I attempt to select a large amount of text
              >>for the Join Lines function. Hopefully, the new input control in
              >>version 5 will take care of this minor annoyance.

              On Sat, 04 Aug 2001, Jody wrote:

              >I hope so too. ;) I can usually find a work-around though.

              The only work-around I found after the error message (and the mangling of
              some text) is to go back to the last disk copy and select less text at a
              time before joining lines.

              I already downloaded your Reformat library and will take a look at it when
              I have a chance. I'll probably make a new library by editing some of your
              clips, and adding mine to make something specific to the usual work I do.

              Jan
              --
              Jan Rosenstreich - mystic@...
              Independent Distributor #130-646
              Multi-Pure Drinking Water Filtration Systems
              http://www.castle.net/~mystic/pages/multintr.html
            • Jody
              Hi Jan, ... With a Clip you can get sections of text at a time. ... One of the many nice things about NoteTab is being able to download a Library and customize
              Message 6 of 8 , Aug 4, 2001
              • 0 Attachment
                Hi Jan,

                >>>The only limitation I find in the Pro version that I run into
                >>>from time-to-time is the 32K paragraph size limitation.
                >
                >On Sat, 04 Aug 2001, Jody wrote:
                >
                >>I hope so too. ;) I can usually find a work-around though.
                >
                >The only work-around I found after the error message (and the
                >mangling of some text) is to go back to the last disk copy and
                >select less text at a time before joining lines.

                With a Clip you can get sections of text at a time.

                >I already downloaded your Reformat library and will take a look
                >at it when I have a chance. I'll probably make a new library by
                >editing some of your clips, and adding mine to make something
                >specific to the usual work I do.

                One of the many nice things about NoteTab is being able to
                download a Library and customize it to fit your own needs without
                have to write it from scratch.

                Happy NoteTab'n,
                Jody Adair

                The NoteTabbers Assistant Page
                http://www.notetab.net

                The NoteTab Basic Discussion List
                mailto:NoteTab-Subscribe@yahoogroups.com
                mailto:NoteTab-UnSubscribe@yahoogroups.com
                http://www.egroups.com/group/notetab
              • Jody
                Hi Jan, I attached a smaller format Library called eForm r It may have some different methods than the ReFormat which is much larger. Take care. ... = V5
                Message 7 of 8 , Aug 4, 2001
                • 0 Attachment
                  Hi Jan,

                  I attached a smaller format Library called eForm'r It may have some different methods than the ReFormat which is much larger. Take care.

                  >I already downloaded your Reformat library and will take a look at it when
                  >I have a chance. I'll probably make a new library by editing some of your
                  >clips, and adding mine to make something specific to the usual work I do.

                  ----------

                  = V5 MultiLine NoSorting TabWidth=30

                  H="; Info http://www.fookes.com - http://www.notetab.com - http://www.notetab.net ."
                  Last updated on 12-07-2000.

                  The Clips in this Library were made by Jody Adair. Feel free to edit them to what you need. If you send Library to anybody, please leave the original Clips in the it. There are hints for the different Clips that can be seen when you hold your mouse over a Clip. The hint also shows up on that Status bar.

                  The Clips that have "..." without the quotes after them means you will be prompted for an input. To change a default in the Clip wizards that pop up right click over the Clip and choose "Edit Clip". When the Clip Editor opens you will see [Clips] on its tab and the script in the main edit window. An underscore in front of an item tells NoteTab to display that item in the wizard. Simply use the underscore in front of the item you want to make the default. Do not forget to delete the existing underscore. In some Clips you might come across there might just be a single number, a word or words, but not list. In those cases no underscore is used to mark a default. You simply just change the value to whatever you want.

                  There is something noteworthy to mention here. When joining lines or using the Reformat tool, all lines that are not double spaced will be joined to each other. Be careful when doing whole documents looking out for lists of things. If Join Lines is used on the following:

                  1. NoteTab Pro
                  2. NoteTab Std
                  3. MailBag Assistant
                  4. Album Express
                  5. Screen Savers

                  NoteTab would join the lines so that the following would be the new format and most likely not what you want:

                  1. NoteTab Pro 2. NoteTab Std 3. MailBag Assistant 4. Album Express 5. Screen Savers

                  I suggest you make a test file to "play" with until you understand how the Clips are working. Be sure to put in a list like above. Please read Clip Basics for more help on writing Clips or sign up for the NoteTab Clips or HTML lists.

                  If you do decide to order any of our products I would greatly appreciate taking your order, I do get a commission - thank you! CD-ROMs are available with our most popular freeware and shareware on them (depending on product). Please ask me for the price and contents if you are interested or go online to the Online Ordering link below.

                  Online Ordering
                  http://www.notetab.net/order/order.htm

                  Order Form for Mail Order
                  http://www.notetab.net/order/prtorder.htm

                  Get more free Libraries and Clips at my NoteTab site,
                  The NoteTabbers Assistant Page:
                  http://www.notetab.net

                  And always remember,

                  Happy NoteTab'n,
                  Jody Adair
                  Jody@... (Support@...)

                  Fookes Software
                  Customer Sales and Support
                  P.O. Box 998
                  Milton, FL 32572-0998 USA

                  Please note that we do not support our freeware and some of it is completed in the sense that no more work will be done to it. Feel free to send suggestions and bug reports please.

                  Suggestions: feedback@...
                  Bugs: bugs@...

                  Fookes Software on the Internet
                  http://www.fookes.com
                  NoteTab Editors on the Internet
                  http://www.notetab.com
                  All Fookes Software on the Internet
                  http://www.fookes.com/products.htm


                  H="Send eMail..."
                  ^!Continue If using OE5, please upgrade to v4.83 or higher if you are not running that. You must have MAPI enabled to use this Clip. (You can remove this box from being seen by putting a semi-colon in front of the line. Continue?
                  ^!eMail ^?[eMail &address=_Jody@...|Sojourner@...|Support@...];^?[eMail &subject=^&];^?[&Use text from focused document to eMail message?=_Yes^=+|No^=]

                  H="Select All, Strip eMail Quotes, Remove Double Spaces, and Join Lines -- Only does a selection if text is selected."
                  ^!SetScreenUpdate Off
                  ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip_2
                  ^!Select All
                  ^!Goto Skip
                  ^!Set %IsSelected%=1
                  ; ^!Toolbar e-Mail Unquote

                  ^!Replace ">>" >> "" ASH
                  ^!IfError Next else Skip_-1
                  ^!Replace " >" >> "" ASH
                  ^!IfError Next else Skip_-1
                  ^!Replace ">" >> "" ASH
                  ^!IfError Next else Skip_-1
                  ^!Replace "^p " >> " " ASH
                  ^!IfError Next else Skip_-1
                  ^!IfDiff " " "^$GetChar$" Skip_2
                  ^!Replace " " >> "" S
                  ^!IfError Next else Skip_-2

                  ^!Set %Format%=^$StrFormat("^$GetSelection$";0;99999;No)$
                  ^!Set %Formated%=^$StrReplace(" ";" ";"^%Format%";0;0)$
                  ^!InsertText ^%Formated%
                  ^!IfTrue ^%IsSelected% Skip
                  ^!Jump 1


                  H="Join Lines Unselects after joining. If no selection is made the whole document is done."
                  ^!SetScreenUpdate Off
                  ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip_2
                  ^!Select All
                  ^!Goto Skip
                  ^!Set %IsSelected%=1
                  ^$StrFormat("^$GetSelection$";0;99999;0)$
                  ^!IfTrue ^%IsSelected% Skip
                  ^!Jump 1


                  H="Join Lines Selection kept after joining. If no selection is made the whole document is done."
                  ^!SetScreenUpdate Off
                  ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip_2
                  ^!Jump 1
                  ^!Select All
                  ^!Toolbar Join Lines
                  ^!IfTrue ^%IsSelected% Skip
                  ^!Jump 1


                  H="Split Lines Split lines at current window width."
                  ^!SetScreenUpdate Off
                  ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip_2
                  ^!Jump 1
                  ^!Select All
                  ^!Toolbar Split Lines
                  ^!IfTrue ^%IsSelected% Skip
                  ^!Jump 1


                  H="Split Lines... Prompted where to split lines at. (Sets column wrap for whole document.)"
                  ^!SetScreenUpdate Off
                  ^!SetColumnWrap ^?[Sets COLUMN WRAP for whole document. Wrap to=50|55|60|_65|70|75|80]
                  ^!Toolbar Split Lines
                  ^!IfTrue ^%IsSelected% Skip
                  ^!Jump 1


                  H="Reformat Lines"
                  ^!SetScreenUpdate Off
                  ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip_2
                  ^!Jump 1
                  ^!Select All
                  ^$StrFormat("^$GetSelection$";0;72;0)$
                  ^!IfTrue ^%IsSelected% Skip
                  ^!Jump 1


                  H="Reformat Lines..."
                  ^!Set %Margin%=^?{Left margin=0}; %Width%=^?{Text width=_72|^=}; %Justify%=^?{Justify=Yes|_No}
                  ^!SetScreenUpdate Off
                  ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip_2
                  ^!Jump 1
                  ^!Select All
                  ^$StrFormat("^$GetSelection$";^%Margin%;^%Width%;^%Justify%)$
                  ^!IfTrue ^%IsSelected% Skip
                  ^!Jump 1


                  H="Indent Paragraph Joins *all* lines if no selection is made and indents first line of paragraph 5 spaces"

                  ; Note: If you are doing the whole document, ensure the text to
                  ; indent is on the first line. If you are doing a selection, the
                  ; start your selection on the same line you want indented.
                  ^!SetScreenUpdate Off
                  ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Selected
                  ^!Select All
                  ^$StrFormat("^$GetSelection$";0;99999;0)$
                  ; ^!Select All
                  ^!Toolbar Join Lines
                  ^!Replace "^p^p" >> "^p^p " WAS
                  ^!Goto Top

                  :Selected
                  ^!Set %Start%=^$GetRow$:^$GetCol$
                  ^$StrFormat("^$GetSelection$";0;99999;0)$
                  ^!SelectTo ^%Start%
                  ^!Toolbar Join Lines
                  ; Change amount of spaces on replace side with number you
                  ; want or use a ^t (tab) in place of spaces. See InsertText
                  ; below also and do the same thing.
                  ^!Replace "^p^p" >> "^p^p " HAS
                  ^!SetCursor ^%Start%
                  ^!InsertText " "
                  ^!Goto End

                  :Top
                  ^!Jump 1
                  ^!InsertText " "


                  H="Fix Lines & Blank Space Lines Works for really messed up posts like from OE5 and MACs."
                  ^!Select All
                  ^$StrFixLines("^$GetText$")$
                  ^!Replace "^p ^p" >> "^p^p" WAS
                  ^!IfError Next else Skip_-1
                  ^!Replace "^p ^p" >> "^p^p" WAS
                  ^!IfError Next else Skip_-1
                  ^!Replace "^p ^p" >> "^p^p" WAS
                  ^!IfError Next else Skip_-1


                  H="Remove Numbers... Removes numbers from the front of lines such as 1., 2., 3. ... Does selection or whole document."
                  ^!IfTrue ^$IsEmpty("^$GetSelection$")$ Next else Skip
                  ^!Jump 1
                  ^!Replace "^\d*\^?[Enter characters after number. Period and space shown=_. |]" >> "" SHAR


                  H=";"


                  H="Save As: Saves document with no prompt by current name and path."
                  ^!Save:As ^##


                  H="RecycleFile Recycles focused document, both temp file and original"
                  ^!RecycleFile ^**
                  ^!RecycleFile ^##
                  ^!Close Discard


                  H="Search Disk Put your own path in the Clip to a fequently searched file or folder"
                  ; ^!Toolbar Search Disk
                  ^!Keyboard Ctrl+D &90 Alt+M &200 #E:\NoteTab Pro\Documents\Funnies\funnies.otl#

                  ----------


                  Bye for now,
                  Jody Adair
                  Prov. 3:5-7; 4:23

                  http://www.purewords.org/sojourner
                  http://www.purewords.org/kjb1611
                  http://www.notetab.net

                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.