Pasting plain text into Coda doesn't respect tabs/indentation

Whenever I paste text from macOS’s TextEdit app, which is just a plain text tool (or at least that’s the setting I use), any tabs in the text are replaced by "?"s. I have to manually delete the "?"s and enter my own tabs.

Example:

List of things:
     - Item
     - Item
          - Item
     - Item

…becomes…

List of things:
?- Item
?- Item
??- Item
?- Item

Can this please be fixed? Thanks.

UPDATE 1: Since my post, the behavior has changed. Now instead of replacing each tab with a “?”, each tab is replaced with a " ", which is even more difficult to discern at a glance.

UPDATE 2: This formula . . .

Concatenate(
  "Line 1",
  LineBreak(),
  IndentBy("Line 2 - indented with \"IndentBy(1)\"", 1),
  LineBreak(),
  Character(9), "Line 3 - indented with \"Character(9)\"",
  LineBreak(),
  " Line 4 - starts with a Space (\" \")",
  LineBreak(),
  "Line 5"
)

. . . results in this . . .

image

. . . which makes me think the Tab character is being preserved, but the Tab character looks identical to the Space character.

So there are two issues at play here:

  1. “Character(9)” is not, in fact, the same width as “IndentBy()” even though both a Tab character and an Indentation should, I believe, be the same width.
  2. “Character(9)” does not indent items in a list. ( Concatenate(Character(9), "Some text").BulletedList() does not result in indentation; the bullet stays aligned all the way to the left.) I’m not sure it should behave any different. But I would hope that when pasting plain text that has Tab characters, Coda would either treat those Tabs as indentations or convert them when pasting.
2 Likes

Did you try CMD + Shift + V?

1 Like

Yes. No difference.

It’s weird, though. Since my post, it has changed. Not fixed, mind you. Now instead of replacing each tab with a “?”, the tabs are replaced with " ", which is even more difficult to discern at a glance.

1 Like

I copy this and pasted into Apple Notes, then copy from Apple Notes and pasted in Coda, works fine:

image

1 Like

Unfortunately, that’s because I had to type that example using spaces to make it look the same as tabs :grimacing: (tabs or indentation aren’t supported in the text editor for this forum). If you type that example from scratch in Apple Notes, copy it, and paste it into Coda, there won’t even be spaces (at least that’s what happened when I just did it).

EDIT: I was kind of wrong. If you type it from scratch in Apple Notes then Apple Notes will automatically format it with bullets and tabs. If you copy that and paste it into Coda, it’ll be formatted with bullets and tabs. But if you use tabs in TextEdit, paste it into Apple Notes, and copy that and paste it into Coda, tabs won’t be respected. So the point of this post still stands: If you use tabs in a plain text tool and paste that into Coda, Coda won’t preserve the indentation.

2 Likes