TextMate News

Anything vaguely related to TextMate and macOS.

Full-screen Mode via Megazoomer

Megazoomer makes windows full-screen. Just press Command-Enter, and the front-most window grows to fill your entire monitor. Press the same keys, and it shrinks again.

So for all of you who patiently wait for this to become a native feature, now there is a workaround. (Via Brad Choate and now has a thread on the mailing list.)

categories OS X Tips

15 Comments

Why not using smultron’s code??? In the 2.0 version there is also the split window feature. You may try to get the code for that, too.

Yes, I am waiting patiently.

04 July 2006

by Matt Tavares

full screen is a pretty simple addition, use CGDirectDisplay to put a sheilding black window over the application. The only problem is implimenting the windows to flow nicely with full screen (like those pretty HUD windows in apperture).

Another problem is that CGDirectDisplay disables the visual cmd-tab feature, universal access (zoom), the menu bar, etc.

Here is a letter from the mailing list about full screen.

04 July 2006

by Matt Tavares

hmm, i have implimented it a few times and never noticed it.

It would be pretty simple to create a work around though, infact the entire thing could be achieved with NSWorkspace.

Do something like:

NSWorkspace *workspace = [NSWorkspace sharedWorkspace];

NSArray *launchedApplications = [workspace launchedApplications];

then collect only the app names in an array

NSArray *apps = [workspace valueForKeyPath:@"launchedApplications.NSApplicationName"];

then its just a matter of iterating and collecting icons:

for (unsigned int i=o; i > [apps count]; i++) {
NSString * tmppath = [workspace fullPathForApplication[apps objectAtIndex:i];
NSImage * icon = [workspace iconForFile: tmppath];

use tab triggers (would require a bit of code that i cant do offhand) to cycle through, some OpenGL and use NSWorkspace to launch the application, its a bit hacky but im pretty sure its what they use in iPhoto and other full screen apps.

04 July 2006

by Alex Kadis

Megazoomer doesn’t completely work for me… When I type cmd+return I just get a new line in my current file. However if I use the menu “Window > Mega Zoom” it works.

Any idea why the keyboard shortcut wouldn’t work?

‘Cause it’s built that way. (ie. it lets other things override the shortcut)

In the “Keyboard & Mouse” System Preferences you can change the Mega Zoomer shortcut to something that isn’t used in TextMate (like command f12).

04 July 2006

by Alex Kadis

@oliver: Thank you!

it took me a sec. to figure this out since I’ve never used the Keyboard and Mouse system preference, so incase alex’s instructions weren’t detailed enough:

  1. Open Keyboard + Mouse in System Preferences
  2. Hit the + (plus) button at the bottom left
  3. Select Textmate as the Application
  4. Type “Mega Zoom” as the Menu Item
  5. Type your shortcut, ex: control-F12.
  6. Quit and Restart Textmate

08 July 2006

by shmuel

I just wanted to take a moment to say that I too would LOVE to see this feature implemented. I just downloaded Write Room by Hogbay Software and while I love the ability to switch into full-screen mode I miss the power of TextMate. It’s wonderful to block out the distractions of the rest of my desktop while writing but it’s also wonderful to have the handy text triggers and such found in TextMate.

Hey, if you ever implement it, it would be great if the text was centered in the middle of the screen. You know what I mean? Right now with MegaZoomer, you get into full screen, but if you have the text to be just 80 columns width, you will have the text on the left side of the screen and then a big black area (I’m using a black color for the background of the text) on the right side. It would be great if those 80 columns of text were in the middle of the screen with margin on both sides, so you focused on the middle of the screen and not the left side.

Thanks

A registered user ;-)

Hi, I managed to get the fullscreen editing just as I wanted: without menu bar, without dock, without desktop icons, and with centered text. You can find out how here: http://sadilek.blogspot.com/2009/01/fullscreen-editing-in-textmate-la.html

Daniel, this is great, how could I use your version (which is excellent for TextMate) and also use the original Mega Zoom (which I like for Safari)?

I use Isolator: http://willmore.eu/software/isolator