Justin Carter's madfellas.com

Sublime Text 2 and Distraction Free mode

Sublime Text 2 offers a couple of different editing modes which I find useful on different occasions. The bulk of my coding is usually done in a normal window mode but there is also Full Screen mode, which - obviously - takes over the whole screen including the taskbar area, and Distraction Free mode, which just lets you view ONLY the file you're working on without any extra chrome or features or "distractions" on the screen.

Out of the box, Distraction Free mode can feel a little bit limiting because word wrap is turned on at 80 characters. I like the way the code is "centred" on-screen but I prefer to increase the word wrap to at least 120 characters (Sublime Text's word wrapping is quite good with automatic intending of wrapped lines) and also to hide the menu bar and enable the mini-map (the mini view of the code on the right side of the screen).

 

sublimetext2-distraction-free

 

To do this you can simply add some settings to your "Distraction Free User Preferences" file, via the Preferences -> File Settings - More -> Distraction Free - User menu item. You can also toggle the menu bar and mini-map in the View menu and your preferences will be saved for all Distraction Free mode sessions.

 

{
	"gutter": false,
	"line_numbers": false,
	"word_wrap": true,
	"wrap_width": 120
}

 

Note I have gutter and line numbers disabled (as they are out of the box), but you can enable them if you wish. I'm not yet used to having the line numbers and gutter appear all the way to the left side of the screen when the code is centred, it feels slightly wrong, but I've also found that when concentrating on a single file I'm really not worried about line numbers. They are a must at almost all other times though :)

It's also worth noting that you could turn on tabs if you wanted to, or any other number of features - whatever works for you.