textmate – D’Arcy Norman dot net https://darcynorman.net no more band-aids Wed, 24 Aug 2016 23:21:25 +0000 en-US hourly 1 https://darcynorman.net/wp-content/uploads/2015/04/crankforpeace3-552f33a1v1_site_icon-32x32.png textmate – D’Arcy Norman dot net https://darcynorman.net 32 32 1067019 Ideas for improving TextMate https://darcynorman.net/2006/09/19/ideas-for-improving-textmate/ https://darcynorman.net/2006/09/19/ideas-for-improving-textmate/#comments Mon, 30 Nov -0001 00:00:00 +0000 http://1402372379 TextMate for about a week now, and while it's almost universally an incredible piece of magical software, I have been keeping a list of things that could use tweaking (you know, to make it even magicaller).
  • Arrange Windows. BBEdit's got a great way to tile open windows. It's very handy to compare multiple open documents. Would be very handy in TextMate. Something like "tile all open windows in evenly spaced columns" or "tile them all in equal-sized windows arranged nicely across that 20 inch cinema display"
  • Split window view. Terminal has it. XCode has it. BBEdit has it. Makes it really easy to work on 2 different parts of the same document.
  • Reindent code. Like Tidy does for HTML. But for other code. JEdit has a pretty good one. XCode's got a really good one. It makes it very easy to keep source code looking clean and tidy. Bonus points for optionally adding documentation stubs for languages that use that sort of thing (javadoc tags, etc...) It looks like I could mess around with the Bundle Editor for various languages, but having this as stock behaviour would be a better way to share with the rest of the class.
  • HTML and CSS reformatting - flat, compact, hierarchical. It's surprising how handy that is. Sometimes having the Official Tidy Cleanup Version isn't what you need.
  • Tear-off bundle palettes. The "Select Bundle Item" menu/palette is close, but not task-specific. It's not as handy having to constantly search for a function. I'd like to just tear off the HTML, or CSS, or maybe both.
  • Search all open files - if I've got a bunch of files open, from various locations (and perhaps on different servers) - they won't be in the same Project, so I can't use Find in Project.
]]>
I’ve been using TextMate for about a week now, and while it’s almost universally an incredible piece of magical software, I have been keeping a list of things that could use tweaking (you know, to make it even magicaller).

  • Arrange Windows. BBEdit’s got a great way to tile open windows. It’s very handy to compare multiple open documents. Would be very handy in TextMate. Something like “tile all open windows in evenly spaced columns” or “tile them all in equal-sized windows arranged nicely across that 20 inch cinema display”
  • Split window view. Terminal has it. XCode has it. BBEdit has it. Makes it really easy to work on 2 different parts of the same document.
  • Reindent code. Like Tidy does for HTML. But for other code. JEdit has a pretty good one. XCode’s got a really good one. It makes it very easy to keep source code looking clean and tidy. Bonus points for optionally adding documentation stubs for languages that use that sort of thing (javadoc tags, etc…) It looks like I could mess around with the Bundle Editor for various languages, but having this as stock behaviour would be a better way to share with the rest of the class.
  • HTML and CSS reformatting – flat, compact, hierarchical. It’s surprising how handy that is. Sometimes having the Official Tidy Cleanup Version isn’t what you need.
  • Tear-off bundle palettes. The “Select Bundle Item” menu/palette is close, but not task-specific. It’s not as handy having to constantly search for a function. I’d like to just tear off the HTML, or CSS, or maybe both.
  • Search all open files – if I’ve got a bunch of files open, from various locations (and perhaps on different servers) – they won’t be in the same Project, so I can’t use Find in Project.
]]>
https://darcynorman.net/2006/09/19/ideas-for-improving-textmate/feed/ 4 1413
TextMate’s Extended Attributes https://darcynorman.net/2006/09/19/textmates-extended-attributes/ Mon, 30 Nov -0001 00:00:00 +0000 http://1811922361 ls -l lists. From the text that was displayed in Drupal, it looks like it was storing things like cursor position and text selection in a file that was edited by TextMate. Normally not a big deal, but Drupal was picking them up as potential themes and modules, and dutifully listing them, and choking on the included cursor/selection info. I did some poking around and found the answer (sometimes, RTFM really helps, and TextMate has a really good built-in manual). Here's the scoop:
19.4 Extended Attributes (Metadata) Starting with Tiger, OS X supports setxattr and friends. TextMate makes use of extended attributes to store the carets position, bookmarks, what text is folded and is likely to make further use of extended attributes in the future. For filesystems which do not natively support extended attributes (like network mounted disks), OS X instead stores the extra information in a file named ._«filename», where «filename» is the name of the original file. Since not all users think that this extra (hidden) file is worth having in order for TextMate to remember state, it is possible to disable the use of extended attributes by quitting TextMate and running the following from the shell: defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1
So, the strange files, named "._whateverFileIWasEditing.php" are created by TextMate when editing files on a non MacOSX-Tiger system. Like, say, a MacOSX Panther Server volume mounted via Appleshare. Easy fix, but it probably could have been a checkbox rather than a hidden defaults value.]]>
TextMade is my current favorite text editor. But, while editing some files on our main Drupal server, I noticed it was leaving some ghost files around. The filenames were all prefixed with “._” so they didn’t show up in the Finder, or in normal ls -l lists. From the text that was displayed in Drupal, it looks like it was storing things like cursor position and text selection in a file that was edited by TextMate.

Normally not a big deal, but Drupal was picking them up as potential themes and modules, and dutifully listing them, and choking on the included cursor/selection info. I did some poking around and found the answer (sometimes, RTFM really helps, and TextMate has a really good built-in manual). Here’s the scoop:

19.4 Extended Attributes (Metadata)

Starting with Tiger, OS X supports setxattr and friends.

TextMate makes use of extended attributes to store the carets position, bookmarks, what text is folded and is likely to make further use of extended attributes in the future.

For filesystems which do not natively support extended attributes (like network mounted disks), OS X instead stores the extra information in a file named ._«filename», where «filename» is the name of the original file.

Since not all users think that this extra (hidden) file is worth having in order for TextMate to remember state, it is possible to disable the use of extended attributes by quitting TextMate and running the following from the shell:

defaults write com.macromates.textmate OakDocumentDisableFSMetaData 1

So, the strange files, named “._whateverFileIWasEditing.php” are created by TextMate when editing files on a non MacOSX-Tiger system. Like, say, a MacOSX Panther Server volume mounted via Appleshare. Easy fix, but it probably could have been a checkbox rather than a hidden defaults value.

]]>
1410
TextMate is my new default text editor https://darcynorman.net/2006/09/18/textmate-is-my-new-default-text-editor/ https://darcynorman.net/2006/09/18/textmate-is-my-new-default-text-editor/#comments Mon, 30 Nov -0001 00:00:00 +0000 http://1920976699 I've been using BBEdit for what feels like a decade - it was the late '90s, anyway.

I just switched to TextMate. It's an amazing little editor, that feels like it's taken the best parts of XCode, BBEdit, JEdit, and many others, and mashed them all into one slick and powerful little app.

Here's probably the coolest feature (well, the coolest feature that I've discovered today, anyway). The HTML bundle has a "Validate Syntax (W3C)" action, which sends the contents of the document (or selection) to the W3C HTML syntax validator. The resulting page is then modified by TextMate, such that clicking the error/warning links in the report take you to the correct line in your source document. When I tried that the first time, I was stunned. But, of COURSE that's how it SHOULD work. Very cool.

TextMate W3C HTML Validator IntegrationTextMate W3C HTML Validator Integration

The other really handy thing it has over BBEdit is autocompletion. It'll complete html tags, code function names, and lots of other goodies. That's such a timesaver. Why doesn't BBEdit have that?

It's got the document/project drawer from JEdit, and tabs for open documents. It's got code folding. It's got a bundle that lets you send a project to XCode to be compiled, run and debugged. It's got syntax and code colouring for just about any language out there. It's got a Webkit-powered Preview window that actually lets you edit the previewed document, and creates acceptable code.

I've put in a request for a TextMate license, but if that doesn't get approved in time, I'll be pulling out my Visa card and buying one myself. I keep catching myself saying "heh. that's exactly how it SHOULD work." It's not perfect, but it's close.

]]>
I've been using BBEdit for what feels like a decade – it was the late '90s, anyway.

I just switched to TextMate. It's an amazing little editor, that feels like it's taken the best parts of XCode, BBEdit, JEdit, and many others, and mashed them all into one slick and powerful little app.

Here's probably the coolest feature (well, the coolest feature that I've discovered today, anyway). The HTML bundle has a "Validate Syntax (W3C)" action, which sends the contents of the document (or selection) to the W3C HTML syntax validator. The resulting page is then modified by TextMate, such that clicking the error/warning links in the report take you to the correct line in your source document. When I tried that the first time, I was stunned. But, of COURSE that's how it SHOULD work. Very cool.

TextMate W3C HTML Validator IntegrationTextMate W3C HTML Validator Integration

The other really handy thing it has over BBEdit is autocompletion. It'll complete html tags, code function names, and lots of other goodies. That's such a timesaver. Why doesn't BBEdit have that?

It's got the document/project drawer from JEdit, and tabs for open documents. It's got code folding. It's got a bundle that lets you send a project to XCode to be compiled, run and debugged. It's got syntax and code colouring for just about any language out there. It's got a Webkit-powered Preview window that actually lets you edit the previewed document, and creates acceptable code.

I've put in a request for a TextMate license, but if that doesn't get approved in time, I'll be pulling out my Visa card and buying one myself. I keep catching myself saying "heh. that's exactly how it SHOULD work." It's not perfect, but it's close.

]]>
https://darcynorman.net/2006/09/18/textmate-is-my-new-default-text-editor/feed/ 11 1406