sublimehq / sublime_text

Issue tracker for Sublime Text
https://www.sublimetext.com
801 stars 35 forks source link

Integrate sublime cursor and macOS system text cursor #1998

Open simondell opened 6 years ago

simondell commented 6 years ago
  1. Explain briefly what the enhancement is and why you think it would be useful.

macOS has a built-in Zoom facility, useful for enlarging sections of the screen. It can be set to follow system mouse and text cursors, allowing for visually impaired users to enlarge the area under the cursor and follow along with the text they type or pointer actions they perform.

Currently, the Sublime Text cursor is separate from the system cursor. This means that visually impaired users (and others who like to use zoom) cannot type into Sublime and have the zoom follow along with them. They need to constantly switch between typing and mouse use. Syncing the Sublime and system text cursor positions would enable the built-in follow-along behaviour and improve the Sublime experience for those users. In my particular case it would remove the desire to become an advanced Vim user completely ;-)

  1. Provide any other necessary or useful information regarding your issue, such as (code) examples or related links.

In those situation where multiple cursors are in play, some "least surprise" experiments would be needed. My gut feeling is that whilst selecting and editing, the system text cursor should update to the last selected cursor point. When deselecting multiple cursors, the system text cursor should update to the first clicked one. This would match the current visual eye+mouse workflow.

wbond commented 5 years ago

It doesn't appear that there is a way to "integrate with the system text cursor", but rather you can tell the OS where to magnify when smart magnification is turned on.

https://developer.apple.com/documentation/appkit/nsview/1483305-rectforsmartmagnificationatpoint?language=objc

wbond commented 5 years ago

Rather, that seems to do with a double-tap gesture for zooming.

My hunch is that we'd need to implement various NSAccessibility properties for the insertion point line, selection range and frame for range.

beequeue commented 9 months ago

I know this issue is 5+ years old but I'm wondering if there's any appetite for tackling it? I'm a long-term user but will increasingly need to use zoom, which is going to require me to switch to another editor, which I don't really want to do.