Sublime Forum

Plugin Leads: A "Focus Mode" for writing like iA Writer


I would like to create a package to enable users to toggle a “focus mode” feature like the one in the iA Writer app:

Basically, the feature highlights the current sentence (the app is for writing prose, not code) by “dimming” all other text.

I know I’ll need to use some method of regexp-ing around the cursor to find the last and previous stop characters that denote the end of a sentence (e.g !?.), although there may be some trickiness involved in cases such as:
“We left the U.S and went to St. Lucia.”
where periods are used to abbreviate instead of delimit a sentence.

I have no idea how to change how Sublime displays a particular section of displayed text.

I have never written a Sublime package, but have plenty of development experience.
I love sublime and am excited to start contributing to the community.

Could people help point me in the right direction?

Any feedback/advice on how to go about doing this would be greatly appreciated.



Hah! Well I’m a little late on this thread but I’ve been looking for this so I’ll try my hand at writing a Sublime Text plugin for focus mode.

As for the special case you mentioned above “We left the U.S. and went to St. Lucia.” even iA Writer changes sentence after each of the periods so I’m not going to worry about that.