tag:blogger.com,1999:blog-59413252008-09-08T12:48:53.684+01:00Deflexion.comdeflexion & reflexion from nancy mcgoughNMnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-5941325.post-19028228942041130052008-03-21T17:37:00.007Z2008-03-21T21:01:33.306ZUsing MacVim Almost Everywhere in Mac OS X<a href="http://code.google.com/p/macvim/">MacVim</a> 7.1 snapshot 24 was released on 2008-March-14 and includes built-in [*] support for the <a href="http://www.barebones.com/support/develop/odbsuite.shtml">ODB Editor Suite</a> protocol. If you activate "External Editor" in the MacVim >Preferences > Integration panel, a menu item named "Edit in MacVim" will appear in the Edit menu of lots of Mac OS X applications, including the apps listed <a title="TextMateAwarePrograms" href="http://wiki.macromates.com/Main/TextMateAwarePrograms">here</a>. This is fantastic and has made Mac OS X much more fun for me. For example, I'm currently editing this blog item in Blogger running in Safari. If I want to mess around with the HTML of this blog item, I can do this: <ol><li>Click the Blogger "Edit Html" tab.</li><li>From the Safari Edit menu, choose Edit in MacVim.</li><li>Use MacVim to edit the HTML and then use the Vim command :wq to write and quit.</li><li>The focus returns to the Blogger blog item text box, which now contains the text that MacVim wrote out.</li></ol><div>This makes Blogger blog editing infinitely easier and possibly means that I can stop my search for another blog editing tool. And maybe I'll start blogging more!</div><div><br /></div><div><b><i>Tip 1:</i></b> To tell  MacVim that you are editing an HTML file, you can either use the following command within MacVim:<pre>:set ft=html</pre>Or put this line in your .vimrc: <pre>autocmd BufRead *.safari setfiletype html</pre> This autocmd works because Safari uses the extension .safari for the name of the temporary file that is read by MacVim.<br /> </div><div> <b><i>Tip 2: </i></b>For more HTML+Vim tips, see the thread <a href="http://groups.google.com/group/vim_mac/browse_thread/thread/21a49b487f02d448/1404633ee5504ad4">HTML editing and tag completion</a> that I started in the <a href="http://groups.google.com/group/vim_mac">vim_mac mailing list</a>.<br /></div><br /><div>[*] In Snapshot 23 and earlier, the ODB Editor could not be activated in the Preferences panel but instead needed to be activated via a complicated sequence of commands.<br /></div>NMnoreply@blogger.com