If a line wraps, it still counts as one line even if it takes two or more visually. Now, to make it clear, I am talking about numbering logical lines, not visual ones. The problem is that NSRulerView assumes a linear and regular scale. So, snatching some free time in between other things, I decided to tackle the problem. Poking around, I found some tips on how to do it but it seemed like there were odd problems implying it wasn’t as straightforward as one would think. Nonetheless, I was curious about implementing line numbers. Less visual clutter and addresses the problem at hand. I’m instead considering doing an indented margin for continuation lines. I thought it might be overkill for a script editor that will mostly be used for scripts less than ten lines long. If you don’t know what I’m talking about, look at TextMate (the example he cited) or XCode (you need to turn it on in preferences). One of his suggestions was putting line numbers in the left gutter. Nonetheless, a user recently pointed out that when a line wraps, it’s hard to tell if it’s a continuation of the previous line or a new one. I’ll admit, I didn’t set out to make an uber-editor since it was intended for small scripts. In version 2.2 of Hazel, I added mini AppleScript and shell script editors so that people could enter scripts inline without having to go to another program and saving it to an external file. Think of it as that conciliatory heart-shaped box of chocolates used as a sorry way to make up for forgetting about your birthday, after which, I go back to my old ways of sitting on the couch all day watching sports, ignoring you. I’ve been neglecting the blog for some time so hopefully this will make up for it.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |