Using MacVim Almost Everywhere in Mac OS X

MacVim 7.1 snapshot 24 was released on 2008-March-14 and includes built-in [*] support for the ODB Editor Suite 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 here. 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: 
  1. Click the Blogger "Edit Html" tab.
  2. From the Safari Edit menu, choose Edit in MacVim.
  3. Use MacVim to edit the HTML and then use the Vim command :wq to write and quit.
  4. The focus returns to the Blogger blog item text box, which now contains the text that MacVim wrote out.
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!

Tip 1: To tell  MacVim that you are editing an HTML file, you can either use the following command within MacVim:
:set ft=html
Or put this line in your .vimrc:
autocmd BufRead *.safari setfiletype html
This autocmd works because Safari uses the extension .safari for the name of the temporary file that is read by MacVim.
 
Tip 2: For more HTML+Vim tips, see the thread HTML editing and tag completion that I started in the vim_mac mailing list.

[*] 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.

Labels: , , , , ,


Hashtag: #using-macvim [?]

Post & Read Comments (located elsewhere)

 

 

Post & Read Comments (located here)

Post a Comment


 

 

Links to this page

Create a Link

 

 

Each item © Nancy McGough
Each comment © the author of the comment
Deflexion.com web site hosted by DreamHost.com
deflexions powered by Delicious · reflexions powered by Blogger
More deflexions & reflexions, & feeds available via the sidebar top & bottom

[link] For bookmarks & links, please use this page's permalink [link]