## Install Vim with Homebrew Python on OS X

Posted on: Wed, 05/16/2012 - 05:50 By: Huahai

For people that need full features of vim, the default installation of vim on Mac OS X is definitely not enough. For example, I need to use vim to post to this blog, which requires a version of vim with python support. I also prefer terminal version of vim to the GUI version, so MacVim is less desirable.

One way to get what I want is to compile a version of vim with homebrew. Homebrew does not officially have a vim fomula, because that would be a duplicate of the system version. Fortunately, we can grab an unofficial formula at
https://raw.github.com/Homebrew/homebrew-dupes/master/vim.rb

## Reference to Individual Email Message in Plain Text File

Posted on: Thu, 12/13/2007 - 22:40 By: Huahai

A lot of people implement GTD methodology entirely with Gmail. I don't feel comfortable doing that because gmail is not that secure. And I think depending on a network service is a bad idea for a GTD system. So I still download all my emails to my local computers.

## Use Vim as Info Page Browser

Posted on: Thu, 11/29/2007 - 07:56 By: Huahai

In this post, I set up vim as a manual page viewer, using ManPageView plugin. It turned out that the same plugin can be used to view info pages as well. All one needs to to is to add ".i" suffix to the command that you are seeking help on. For example, ":Man sed.i" will show the info page for sed. With this information, we can set up vim as info page browser, just add these lines in ~/.bashrc:

## Reverse/Forward Search with Latex-Suite in Vim

Posted on: Thu, 11/22/2007 - 17:19 By: Huahai

When editing a long Latex document, it is beneficial to be able to point from current location in DVI back to Tex, and vice visa. This is what called reverse/forward search between DVI and Latex. With Latex-Suite in Vim, this functionality is already implemented, and there's no need to specify "\usepackage scrltx" in the Tex file. However, it's not fully configured by default. Forward search with "\ls" works, but inverse search by "Ctrl-Left click" in xdiv is not enabled.

## Post syntax highlighted code in Drupal

Posted on: Sat, 11/17/2007 - 10:45 By: Huahai

You may have seen that I sometimes post code here. Wouldn't it be nice if all the code are syntax highlighted, like what we see in a text editor? Well, with the help of Vim, it's easy. Vim is bundled with a "2html" script, that can turn whatever shown in Vim into a HTML file, with all it's color and format. To invoke this command, simply issue ":so \\$VIMRUNTIME/syntax/2html.vim" command in Vim to run the script, or more simply ":TOhtml". No, you don't have to type this many characters, autocompletion should do most of the typing for you. Vim will then open up a window that contains the newly converted HTML file.

(Update: for newer version of vim, need to :let g:html_use_css=0 first)

## Use Vim to read manual page

Posted on: Fri, 11/09/2007 - 22:10 By: Huahai

Command line manual page is an indispensable tool for working with Linux system.If you forget how to use a command, just type man followed by the name of the command. One thing I don't like about the manual system on my Debian sid is that it uses most to display the manual. The key bindings of most feel awkward for me since I am used to vim. Of course, there are many "vimers" like me, and they've found ways to fix this.

## Posting blog entry to Drupal from within Vim

Posted on: Sat, 10/27/2007 - 22:52 By: Huahai

Some people may wonder why would anyone want to do this?

Subscribe to Vim