Previously, I was able to press and hold the - and after few -, the combination of all the - create a solid horizontal line. Now, I use Sierra High and I'm not sure that it changed because of that. I provided an image of the solid horizontal line.

enter image description here

How do I create a solid horizontal line in the .txt file? This is obviously not a necessity, but, I kind of love to have it. I'm into programming, so if the bash script can be helpful, please, let me know.

  • I've always used the underscore for underlining in text files. I've never seen that behavior in textedit but MS Word still does that. – Steve Chambers Jan 7 '18 at 16:36
  • I have done that myself, it’s there. – Arefe Jan 7 '18 at 16:41

It's a menu option in TextEdit. Point your mouse at Edit > Substitutions > Smart Dashes, which I'm guessing will not be ticked. Click on it, and turn it on.

Now when you press and hold the hyphen key, they will be replaced with gapless dashes that will form the line you're after.

There's also some options relating to this in the main preferences pane of TextEdit, which I believe are used for the default settings for new documents being created:

TextEdit Preferences

So make sure Smart dashes is turned on by default. And don't miss the very bottom checkbox, which you might want to uncheck so that you retain this sort of dash-forming hyphens in plain text as well as rich text documents.

Should, by some unfortunate circumstance, this not resolve your issue, leave a comment, and I can provide you with an alternative way to achieve the same thing.

  • @Arefe How did you get on ? Did it work for you ? – CJK Jan 11 '18 at 15:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .