Vim

Installing vim-ipython with MacVim

2 min read

I got really excited at the notion of having IPython built into MacVim (vim-ipython), so over the last few days I’ve spent some time mucking around trying to get this whole thing to work.  Unfortunately there’s not a lot of documentation on how to fix the issues that might pop up, so hopefully this will help some people.  (spoiler - MacVim download is 32 bit zeromq is 64)

First, your prerequisites.  I’m assuming you’re using the awesome HomeBrew.  If you’re not, you’re on your own for some of these sections.

python vim
Read more

Multiple Filetypes in Vim

1 min read

I’m finding this useful as I work with snipmate and have defined custom snippets for solr config files. I still want to use the XML filetype, but I have no real use for the solr fields outside of editing the schema.xml file.

set filetype=xml.solr

Booya.

tips vim
Read more

Customize taglist plugin display

2 min read

I’ve hopped back on the VIM train recently, and I’m loving it. Command-T, NERDTree, buffer explorer and fixing my fonts in MacVIM ( set guifont=Inconsolata:h16 ) have all been essential to the move. That and the INSANELY helpful folks in #vim on freenode.

I just read the VIM book cover to cover. Extremely useful. I recommend it.

The latest thing I figured out I wanted was to make better use of ctags. I’ve gotten used to a bunch of the completion commands, now I’m looking to browse my code better.

vim
Read more

Executing MySQL queries within VIM

1 min read

I haven’t been using vim for very long, but I’ve gotten over the initial learning curve of getting used to the different editing modes. With some help from the guys in #vim on irc.freenode.net, I managed to get this gem:

` map :call SwitchDB() :function SwitchDB() : let g:current_db = input(“Database > “) :endfunction

map :call Doquery() :function Doquery() : if !exists(“g:current_db”) : call SwitchDB() : endif : let query_string = input(g:current_db . " > " ) : if query_string != "” : exe “!mysql " . g:current_db . " -e "” . escape(query_string, ‘”’) . “"” : endif :endfunction `

mysql vim
Read more