Create solid horizontal lines in the .txt file

high sierratext;

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.

Best Answer

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.