Home Download Buy Blog Forum Support

Show All Characters

Re: Show All Characters

Postby adzenith on Thu Dec 22, 2011 1:13 am

colinta wrote:For completeness, here is what I think just looks spiffy:

Image

If this existed I would use it everywhere. Plus then when you have a selection that selects the newline character it's really obvious what's going on.
adzenith
 
Posts: 1214
Joined: Mon Oct 19, 2009 9:12 pm

Re: Show All Characters

Postby billhannah on Wed Jan 18, 2012 1:41 am

I can see why you would say that it would make the interface cluttered, but there is a valid use case for showing line ending characters.

The problem is that if you open text files from outside sources it's not easy to know what line ending scheme is being used. And there are cases when you need to know whether the author is using windows, unix or classic mac style endings. And there are cases when this is important.

While it may clutter the interface, having the option to show line endings would be a preference that could be turned off by default and only turned on by those who wish to see them.

At the moment, I have to open a text file in a different editor when I need to know what line endings are being used, and it's more common than you may think (at least once a week, sometimes many times a day, depending on what I'm working on).
billhannah
 
Posts: 1
Joined: Wed Jan 18, 2012 1:29 am

Re: Show All Characters

Postby jps on Wed Jan 18, 2012 2:32 am

billhannah wrote:The problem is that if you open text files from outside sources it's not easy to know what line ending scheme is being used. And there are cases when you need to know whether the author is using windows, unix or classic mac style endings. And there are cases when this is important.

That's an entirely different topic than drawing little glyphs at the end of each line
jps
Site Admin
 
Posts: 3067
Joined: Wed Mar 19, 2008 12:33 pm

Re: Show All Characters

Postby bizoo on Wed Jan 18, 2012 9:13 am

jps wrote:
billhannah wrote:The problem is that if you open text files from outside sources it's not easy to know what line ending scheme is being used. And there are cases when you need to know whether the author is using windows, unix or classic mac style endings. And there are cases when this is important.

That's an entirely different topic than drawing little glyphs at the end of each line

Agree, it's a totally different topic but I like to have the line endings type displayed somewhere in the status bar (along the encoding).

And for the record even if nobody ask me, I really dislike the line ending symbol everywhere, it's only useless noise.
Just active trim_trailing_white_space_on_save and you never have to think about it.

For the line ending type information currently missing, this is my plugin:
Code: Select all
import sublime_plugin
import sublime

def DisplayEncoding(view, encoding="", line_endings=""):
    view.set_status('encoding', "%s [%s]" % ((encoding if encoding else view.encoding()), (line_endings if line_endings else view.line_endings())))

class StatusBarEncodingListener(sublime_plugin.EventListener):
    def on_load(self, view):
        DisplayEncoding(view)

    def on_post_save(self, view):
        DisplayEncoding(view)
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Show All Characters

Postby Soleone on Fri Feb 03, 2012 9:00 pm

+1, I would definitely like this a lot. I'm used to having TextMate Invisible Characters turned on and it helps a lot.

I guess my use case is that I don't want people I work with to commit trailing whitespace (seems to happen all the time).
Would be great to have an option something like ""draw_white_space": "trailing" that only shows invisible characters at the end of a line.

Of course even better would be if we can easily differentiate between space, tabs, carriage returns instead of just seeing "dots".

No priority, but would be really cool. Keep on rocking, Sublime 2 is the best!
Soleone
 
Posts: 1
Joined: Fri Feb 03, 2012 8:56 pm

Re: Show All Characters

Postby cgibby on Thu Mar 15, 2012 3:53 pm

+1 from me -- especially if there were some visual distinction between \r and \n.
cgibby
 
Posts: 5
Joined: Thu Feb 02, 2012 3:54 pm

Re: Show All Characters

Postby Callidus on Tue Aug 21, 2012 3:53 pm

+1 but i would implement it in a slightly different way. I need to know clearly if there is a CR vs CR LF. I use text editors to view and manipulate data files quite often, and the distinction is significant. See this topic for screenshots of how it's done in Scintilla and notepad++ which is more useful.

http://www.sublimetext.com/forum/viewtopic.php?f=4&t=8258&p=35967#p35967
Callidus
 
Posts: 3
Joined: Tue Aug 21, 2012 3:00 pm

Previous

Return to Technical Support

Who is online

Users browsing this forum: karstenfk, Yahoo [Bot] and 28 guests