June 16th, 2011
dbext.vim is a great vim plugin for accessing just about every kind of database through your vim editor. The description from its website:
“This plugin contains functions/mappings/commands to enable Vim to access several databases. Current databases supported are: Mysql, PostgreSQL, Ingres, Oracle, Oracle Rdb (VMS), Sybase Adaptive Server Anywhere, Sybase Adaptive Server Enterprise, Microsoft SQL Server, DB2, Interbase and SQLite and ODBC are supported. New to version 5.x of dbext introduces the support for Perl’s DBI layer. If the database you are using is not *natively* supported by dbext, but has a DBI interface, dbext’s standard feature set is available. For those already using dbext, the DBI interface should provide a performance boost when running statements against your database. DBI also provides an ODBC bridge, therefore any ODBC compliant database is also accessible.”
I had a little trouble getting it connected to SQL Server from OSX so here are the steps I took to get it work. Hopefully it helps someone else.
May 13th, 2011
If you’re vim auto-completion is incredibly slow when you’re in a directory with a lot of files or large files, the fold method could be the cause of your problems.
Try
:set foldmethod=manual
and see if that speeds up auto-completion.
The following site has a script to put in your .vimrc that will allow you to keep your foldmethod setting and only adjust it to manual when insert text, which is what is causing the slowness.
http://vim.wikia.com/wiki/Keep_folds_closed_while_inserting_text
January 3rd, 2011
If you’re using vim in iTerm2 on your Mac, make sure you select ‘xterm-256color’ in the Report Terminal Type under Terminal Emulation. This will let vim know that you’re using a terminal capable of 256 colors.

March 16th, 2010
Derek Wyatt’s Screencasts – By far the best series on learning Vim I’ve seen. Must see.
http://www.vimeo.com/user1690209/videos
UPDATE – Derek Wyatt has created a new, more organized site for his Vim tutorials
http://www.derekwyatt.org/vim/vim-tutorial-videos/
Vimcasts – This is a good link to add to your rss reader. Updates fairly often with good vim tips.
http://vimcasts.org/
Codeulate Screencasts’ Vim for Rails Developers – I actually haven’t gotten to watch this yet but I will be getting it soon.
http://www.codeulatescreencasts.com/products/vim-for-rails-developers
November 17th, 2009
The following is a list of tools that I use on a daily basis to support my way of Getting Things Done:
- Remember the Milk – My main inbox and list manager.
- Concentrate – My Pomodoro timer for bursts of highly concentrated work.
- Wallet notepad and mini pen – For writing down “stuff” that comes to mind.
- MacVim – Text Editor for editing files of projects, goals, and accomplishments.
- Dropbox – For syncing project files and folders between multiple computers.
- Two Tray Inbox – One tray for incoming and one for ‘to read’.
- Pen and paper – For mind mapping and collecting.
- Books, Blogs, and Audiobooks – For sharpening the axe.
August 26th, 2009
For those of you who going mouseless in Firefox using Vimperator, here’s a good tip that has solved some problems for me.
Use Pass Through Mode by hitting ctrl-z to disable Vimperator on the current page to get normal operation of your keys. This is especially helpful for flash players that need keyboard input or web apps like Gmail that have their own keyboard shortcuts. Then just hit the escape key to return to using Vimperator.
Ctrl-z : Enters pass through mode.
Esc : Escapes pass through mode.
July 30th, 2009
Vim has several advanced ways of undo the changes made in file, however, I’m not going to go into all of them here but just show you one. The :earlier and and :later command in vim can move you backwards and forwards in time through your change history. Very much like Time Machine in OSX.
Note: This is NOT a substitution for source control!
:earlier {count} Go to older text state {count} times.
:earlier {N}s Go to older text state about {N} seconds before.
:earlier {N}m Go to older text state about {N} minutes before.
:earlier {N}h Go to older text state about {N} hours before.
:later {count} Go to newer text state {count} times.
:later {N}s Go to newer text state about {N} seconds later.
:later {N}m Go to newer text state about {N} minutes later.
:later {N}h Go to newer text state about {N} hours later.
Below are some links to more information about :earlier and :later as well as other undo features.
http://vimdoc.sourceforge.net/htmldoc/usr_32.html
http://vimdoc.sourceforge.net/htmldoc/undo.html#undo-branches
June 15th, 2009
This weekend I came across a couple posts on Daily Vim about using vi in other applications such as bash, irb, mysql, or any other readline application.
To use vi mode for all readline applications, including bash, put the following line in your ~/.inputrc file.
set editing-mode vi
To use vi mode for bash only, put the following line in your ~/.bash_profile.
set -o vi
With these features enable, you’re dropped into insert mode and from there you can hit Esc or Ctrl-[ to change to command mode. Enjoy.
September 10th, 2008
Some great Vim plugins I found today:
- Autoclose: Autocloses your “, ‘, (, [, { characters like Textmate.
Download here.
- Surround: Nice shortcuts for working with html and xml like tags, as wells as quotes and others. Found this plugin when looking for a <%= %> macro for my Rails work. It’s <C-s>=. More specifically, go into insert-mode and hit Ctrl-s then ‘=’. Also, hit <C-s>- to start inserting text in a <% -%> block. Works great.
Download here.