What is selecting View > Line Endings meant to accomplish? It doesn’t seem to do anything for me, in either Windows or Linux.
Line Endings
Hmm. And then what’s supposed to happen? I just opened a file, selected View > Line Endings, saved it, closed it, reopened, and I see no line endings. (This is on Windows. Don’t have my Linux machine nearby.)
In the view buffer, ST always uses \n
as the line ending. Your chosen line ending will be used when you actually save the file. (This may be a tiny pitfall when you write a plugin first time. Just always use \n
when you manipulating the view buffer.)
If you want to know what’s the current line ending quickly,
// Display line endings in the status bar
"show_line_endings": true,
Thanks. I’m not a programmer–a prose writer–and I don’t get the functionality here. I was just looking for a way to turn on the carriage returns in the window I’m writing in. I did try making your suggested tweak to my preferences, but nothing changed. It’s not a big deal, though. Just mainly curious what the menu item was for, as I could see no visible change.
In a normal case, ST never renders carriage returns (\r)
. Just choose the Windows line ending, ST will make it done.
It shows the line ending in the status bar. (the bottom-right corner of the window)