9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] sam and hidden characters
@ 2026-02-20 16:35 rc.upcsa
  2026-02-20 21:07 ` Steve Simon
  2026-02-20 21:29 ` Skip Tavakkolian
  0 siblings, 2 replies; 4+ messages in thread
From: rc.upcsa @ 2026-02-20 16:35 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 845 bytes --]

ed has the ability to show hidden characters with the `l` command. As far as I know sam doesn't have such a command, and for the most part I haven't really needed it. Sometimes however I'd like to see which whitespace is tabs and which spaces, and also would like to work with only spaces and no tabs (not sure this is possible in sam). 

I now rely on an external script to detabify when necessary:

```
#!/bin/sh
#detab - Convert tabs to spaces
# Usage in sam: select text, then |detab
expand -t 2
```

Outside of the detab script, however, I lack solutions.I would appreciate any ideas on this.

Rari
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ted2bd286356c97f6-M7cd80b673e059ce4ace2255d
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 1550 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] sam and hidden characters
  2026-02-20 16:35 [9fans] sam and hidden characters rc.upcsa
@ 2026-02-20 21:07 ` Steve Simon
  2026-02-21 13:13   ` rc.upcsa
  2026-02-20 21:29 ` Skip Tavakkolian
  1 sibling, 1 reply; 4+ messages in thread
From: Steve Simon @ 2026-02-20 21:07 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/html, Size: 2309 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] sam and hidden characters
  2026-02-20 16:35 [9fans] sam and hidden characters rc.upcsa
  2026-02-20 21:07 ` Steve Simon
@ 2026-02-20 21:29 ` Skip Tavakkolian
  1 sibling, 0 replies; 4+ messages in thread
From: Skip Tavakkolian @ 2026-02-20 21:29 UTC (permalink / raw)
  To: 9fans

I'm not sure if this is what you're looking for, but you can make the
tabs obvious by doing something like this in the command window:

,x/ / c/→/

The blank space between the first set of /'s is a literal tab (i.e
press tab). You can then use the u command to undo the change.

In the above command, you can replace the right arrow with as many
spaces as you want to expand the tabs to.

On Fri, Feb 20, 2026 at 11:18 AM <rc.upcsa@gmail.com> wrote:
>
> ed has the ability to show hidden characters with the `l` command. As far as I know sam doesn't have such a command, and for the most part I haven't really needed it. Sometimes however I'd like to see which whitespace is tabs and which spaces, and also would like to work with only spaces and no tabs (not sure this is possible in sam).
>
> I now rely on an external script to detabify when necessary:
>
> ```
> #!/bin/sh
> #detab - Convert tabs to spaces
> # Usage in sam: select text, then |detab
> expand -t 2
> ```
>
> Outside of the detab script, however, I lack solutions.I would appreciate any ideas on this.
>
> Rari
> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ted2bd286356c97f6-M18c671f9c23b485bdad5d379
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] sam and hidden characters
  2026-02-20 21:07 ` Steve Simon
@ 2026-02-21 13:13   ` rc.upcsa
  0 siblings, 0 replies; 4+ messages in thread
From: rc.upcsa @ 2026-02-21 13:13 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

Thank you for the helpful suggestions. 
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/Ted2bd286356c97f6-M6efadf3f0a6eb0b17500b7de
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

[-- Attachment #2: Type: text/html, Size: 760 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-22 21:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 16:35 [9fans] sam and hidden characters rc.upcsa
2026-02-20 21:07 ` Steve Simon
2026-02-21 13:13   ` rc.upcsa
2026-02-20 21:29 ` Skip Tavakkolian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).