• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: tabs to spaces
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tabs to spaces


  • Subject: Re: tabs to spaces
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 1 Dec 2008 10:52:22 -0500

I'm a bit confused by the original message since it sounds like he'd
want to convert the other way, but a simple search and replace of tabs
with spaces is missing the point, which is to honor the tabstops in
the transition.  Thus, with a tabstop of 8,  123<tab>456 should turn
into '123     456' with 5 spaces in place of the tab, but
'1234<tab>567' should turn into '1234    567' with only 4 spaces
there.

do shell script "expand" and do shell script "unexpand" seem likely to
be helpful here.


On Mon, Dec 1, 2008 at 10:43 AM, David Crowe
<email@hidden> wrote:
> Convert tabs to spaces?
> Piece of cake with Satimage OSAX (free):
>
> set tab to ASCII character 15
> set theString to "AAA" & tab & "BBB" & tab & "CCC"
> set theString to change tab into "<tab>" in theString
> theString --> "AAA<tab>BBB<tab>CCC"
>
> And they have a free AppleScript editor that I use instead of the built in
> editor:
> http://www.satimage.fr/software/en/downloads/index.html
> - David Crowe
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>



--
Mark J. Reed <email@hidden>
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: tabs to spaces
  • Next by Date: open for access
  • Previous by thread: Re: tabs to spaces
  • Next by thread: Re: tabs to spaces
  • Index(es):
    • Date
    • Thread