{"id":272,"date":"2007-02-08T14:56:18","date_gmt":"2007-02-08T21:56:18","guid":{"rendered":"http:\/\/www.red-sweater.com\/blog\/272\/omg-bbedit-html-code-folding"},"modified":"2007-02-08T14:56:20","modified_gmt":"2007-02-08T21:56:20","slug":"omg-bbedit-html-code-folding","status":"publish","type":"post","link":"https:\/\/redsweater.com\/blog\/272\/omg-bbedit-html-code-folding","title":{"rendered":"OMG BBEdit HTML Code Folding"},"content":{"rendered":"<p>I&#8217;m doing some modest revision to my web site, when I notice one of those stupid HTML glitches where you&#8217;re just positive you must have forgotten to close a tag or something. Thanks to the generally forgiving nature of most web browsers, the page looks more or less OK, except that some table column is the wrong width, or there&#8217;s a rogue &#8220;>&#8221; running wild among your product copy.<\/p>\n<p>\nI know this outs me as the world&#8217;s nerdiest sometimes-web-page-editor, but my preferred environment lately for managing my sites has been Xcode. I can easily do global search\/replace, configure Safari as an executable, etc. I wrote about this weird behavior of mine specifically with regard to WordPress in a <a href=\"http:\/\/www.red-sweater.com\/blog\/141\/livin-in-a-wordpress-hackers-paradise\">past entry<\/a>.\n<\/p>\n<p>\nBut let&#8217;s face it. Xcode&#8217;s editor was not made for HTML editing. I like it mainly because I&#8217;m used to it. I can do my usual coding text manipulation tricks without skipping a beat. But when it comes to finding that unclosed HTML bracket? You can&#8217;t cmd-double-click a <strong>&lt;tr&gt;<\/strong> tag and expect it to automatically find the matching tag, as you can with brackets and curly braces. (Unless there&#8217;s some configuration somewhere? Do tell.)\n<\/p>\n<p>\nThen it occurred to me. Wait a minute, I have a text editor on my computer that is allegedly great at editing HTML. In fact, <a href=\"http:\/\/www.barebones.com\/products\/bbedit\/index.shtml\">BBEdit<\/a> practically drove the entire web page editing industry during the early years. I never edited web pages back then, and since I&#8217;m trapped in Xcode most of the time, I generally only use BBEdit for comparing changes in files. But why not give it a spin?\n<\/p>\n<p>\nI opened up the problematic file in BBEdit and a bright light suddenly descended upon my office. The sound of a choir of singing angels enveloped my senses. Not only does BBEdit rock at editing HTML, but they recently added support for <em><a href=\"http:\/\/www.barebones.com\/products\/bbedit\/new.shtml\">code folding<\/a><\/em>, and of course it works brilliantly and automatically on HTML.\n<\/p>\n<p>\n<img decoding=\"async\" src=\"http:\/\/www.red-sweater.com\/blog\/images\/BBEditHTMLFold.png\"\/>\n<\/p>\n<p>\nOh. That is just so beautiful. BBEdit&#8217;s organization of my document made it a snap to drill in and spot the errant text. But it also makes me cry because I&#8217;ve been waiting so patiently and for so long for code folding in Xcode. I know, I know. <a href=\"http:\/\/developer.apple.com\/leopard\/overview\/tools.html\">Leopard<\/a>. Of course, even then I doubt it will rock the HTML editing like BBEdit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m doing some modest revision to my web site, when I notice one of those stupid HTML glitches where you&#8217;re just positive you must have forgotten to close a tag or something. Thanks to the generally forgiving nature of most web browsers, the page looks more or less OK, except that some table column is [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,23,19,4],"tags":[],"class_list":["post-272","post","type-post","status-publish","format-standard","hentry","category-programming","category-software-reviews","category-technology","category-web"],"_links":{"self":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/272","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/comments?post=272"}],"version-history":[{"count":0,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/posts\/272\/revisions"}],"wp:attachment":[{"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/media?parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/categories?post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/redsweater.com\/blog\/wp-json\/wp\/v2\/tags?post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}