[TxMt] Re: Block Caret for writers (not only for LaTeX)

Novitzky Peter pnovitzky at gmail.com
Sat Jul 18 00:16:58 UTC 2015


Hi Graham,

Many thanks for the suggestion on the blinking frequency. Actually I am quite happy with the frequency in Terminal and other apps. It seems the frequency can be set in TM2 too, in textmate/Frameworks/OakAppKit/src/NSEvent Additions.mm by NSTextInsertionPointBlinkPeriod.

I found the colour for changing the line highlight, but as you said, it is not functional yet. Although it depends how the line highlight will be implemented, it does not really solve my problem: it will still be hard to see where on the actual line the cursor is. 

From all the possible options changing the vertical line bar to block caret is still the simplest and most straightforward way.

All I found, if somebody finds it helpful, is this page at the Apple Developer site:

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextView_Class/index.html#//apple_ref/occ/instm/NSTextView/drawInsertionPointInRect:color:turnedOn:

As much as I understand it, the change should be called with the  - (void)drawInsertionPointInRect:(NSRect)aRect with all its options. Just in case somebody finds this helpful for the commit...

As stated on the page link: http://superuser.com/questions/429464/change-the-width-and-color-of-mac-os-x-text-caret-cursor

"The reason is that the cursor is set by the application itself. There's no "system-wide text cursor" apart from the defaults that most applications inherit. [...] Application developers can change the way the cursor looks in a typical NSTextView by overriding its defaults (drawInsertionPointInRect and setInsertionPointColor) at the current insertion point."

Kind regards,

Peter

On 18 Jul 2015, at 00:34 am, Graham Heath <graham.p.heath at gmail.com> wrote:

> Would it be enough to increase the frequency of the blinking of the caret. Seems to me that a frenetically blinking cursor would be more easily seen.
> 
> Though TextMate doesn't respect the following system settings, maybe it should?
> defaults write -g NSTextInsertionPointBlinkPeriodOff -float 0.1 
> defaults write -g NSTextInsertionPointBlinkPeriodOn -float 0.1
> 
> This comes from the following SuperUser post, which is actually about disabling the blinking, but seemed relevant any way.
> 
> http://superuser.com/questions/466660/how-to-disable-blinking-caret-when-editing-text-in-os-x
> 
> Also some of this issue could be helped by, yet another, request for the "highlight current line" feature.
> 
> Thanks,
> 
> On Fri, Jul 17, 2015 at 8:41 AM, Novitzky Peter <pnovitzky at gmail.com> wrote:
> So far I coloured the vertical bar caret with a contrast colour against the background, but even this is not ideal. Especially if the window loses focus...
> 
> Thanks though for the suggestions. I appreciate it a lot.
> 
> Patience is the art of hoping. ;)
> 
> Peter
> 
> 
> On 17 Jul 2015, at 16:37 pm, Rob McBroom <mailinglist0 at skurfer.com> wrote:
> 
> > On 17 Jul 2015, at 10:47, Novitzky Peter wrote:
> >
> >> Thanks for your advice for using the shortcuts. However, they are not really what is desirable here.
> >
> > I know what you ultimately want. I don’t know if you’ll get it next week, or never.
> >
> > I was just offering suggestions for things you can do today.
> >
> > --
> > Rob McBroom
> > http://www.skurfer.com/
> >
> > _______________________________________________
> > textmate mailing list
> > textmate at lists.macromates.com
> > http://lists.macromates.com/listinfo/textmate
> 
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate
> 
> 
> 
> -- 
> 
> Graham P Heath
> 
> _______________________________________________
> textmate mailing list
> textmate at lists.macromates.com
> http://lists.macromates.com/listinfo/textmate



More information about the textmate mailing list