• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextView and Syntax Highlighting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView and Syntax Highlighting


  • Subject: Re: NSTextView and Syntax Highlighting
  • From: Martin Hewitson <email@hidden>
  • Date: Sat, 20 Dec 2014 07:08:26 +0100

I’m using temporary attributes for TeXnicle (LaTeX editor), but as others have said, it doesn’t work if you need bold etc.

Anyway, you can see the source at github:

https://github.com/martinhewitson/TeXnicle

You need to look in

TeXnicle/TeXnicle/TeXEditor/TextView/TeXColoringEngine.m

Originally I was using standard attributes, but this was way too slow (at least the way I did it) for large documents.

Cheers,

Martin


> On 20 Dec 2014, at 00:44, ecir hana <email@hidden> wrote:
>
> On Fri, Dec 19, 2014 at 6:58 PM, Quincey Morris <
> email@hidden> wrote:
>
>> On Dec 19, 2014, at 05:36 , Charles Jenkins <email@hidden> wrote:
>>>
>>> Could it be that even though the layout manager's temporary attributes
>> are designed for purposes like syntax highlighting, folks don't actually
>> use them because they don't work right during edits?
>>
>> Since temporary attributes are in fact used for (e.g.) spell checking in
>> text fields, I’m certain it works if you know how, but the path of least
>> resistance for us mere mortals seems to be to use regular attributes
>> instead.
>>
>>
> Maybe you haven't seen this article already, hopefully you will find it of
> some use:
>
> http://cocoadev.com/ImplementSyntaxHighlightingUsingTemporaryAttributes
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTextView and Syntax Highlighting
      • From: Charles Jenkins <email@hidden>
References: 
 >NSTextView and Syntax Highlighting (From: Charles Jenkins <email@hidden>)
 >Re: NSTextView and Syntax Highlighting (From: Charles Jenkins <email@hidden>)
 >Re: NSTextView and Syntax Highlighting (From: Quincey Morris <email@hidden>)
 >Re: NSTextView and Syntax Highlighting (From: ecir hana <email@hidden>)

  • Prev by Date: Re: NSTextView and Syntax Highlighting
  • Next by Date: system sounds in iOS
  • Previous by thread: Re: NSTextView and Syntax Highlighting
  • Next by thread: Re: NSTextView and Syntax Highlighting
  • Index(es):
    • Date
    • Thread