Re: getting rid of multiple consecutive blanks ?
John Markley <[email protected]> Sun, 25 Oct 2009 11:04:49 -0400
| Newsgroups | gmane.comp.handhelds.palm.peditors |
|---|---|
| Message-ID | <[email protected]> |
Quoting Paul Nevai <[email protected]>: > On Sun, Oct 25, 2009 at 11:40:42PM +1100, Voytek Eymont wrote: >> horizontal spaces, yes, tabs, perhaps >> >> search/regep that Paul suggested clears the above ones >> >> LF and CR, yes > > See "visibilator" in pedit's manual, do an visibilator job, then do a REGEXP > search/replace job on the visibilated text, then do an de-visibilator job > again. > > Am I too terse? > > All=my=best, Paul > You guys have solved it before I even awoke! Up late last night, thus lazy Sunday morning. Voytek, the little task I set for you is now unnecessary and you can skip it since you are going after all the whitespace possibilities anyway. I was trying to see if we could pare it down to make pScripting the task easier. There are some mildly gnarly event-queue issues with scripting pSearch runs and it may be better for you to just do it manually. I'm going to experiment with pScripting the visibilator process ala Paul. In the meantime, if your text is in peditPro memo, the following pScript will clear all linefeeds (/p10) and replace them with a single space (/p32). It will only run in pedit. The /tap in dlF2 allows placing space (/p32) as the replacement string. Although in general I try to avoid taps, since this does work on my Treo and the coordinates are likely to be the same for all Palms, it should work for you. I used it instead of "/xEpro >" to avoid difficulties with selection of saved replacement strings. {delete LF pPro:: /xEpro f /xEpro T/xEpro W /p10 /$script$[@@dLF2@@]} {dLF2:: /tap i[080,080] /$script$[@@dLF3@@]} {dLF3:: /p32 /xEpro f A /$script$[@@dLF4@@]} {dLF4::d} If you run this with an open memo with active cursor you should see all the linefeed spaces disappear in one fell swoop, collapsing it into compact text. The insertion of the single space is to avoid too much collapse resulting in some loss of separation between some words. ~John ------------------------------------ Latest pedit/pToolSet/LapTopHack at http://www.osuweb.net/~pc/pca/pc_all.zip pedit/pToolSet/LapTopHack scripting info/resources at http://www.peditors.com Peditors Forum http://groups.yahoo.com/group/peditors Unsubscribe by writing to peditors-unsubscribe-hHKSG33Tihh4sT85+ipIM4ckdKdSAMto@public.gmane.org! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/peditors/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/peditors/join (Yahoo! ID required) <*> To change settings via email: mailto:[email protected] mailto:[email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/