Vim: vim-pasta

January 24, 2012

Heyooo – Happy Taco Tuesday! I just ate a terrifying amount of tacos at our favo(u)rite local taco place. I feel pretty gross, but am not disgusted with myself enough to stop me from writing about a vim plugin named after pasta!

vim-pasta, recently featured on the changelog, is another one of these plugins that I have around but don’t even notice until I sit back and wonder why something just worked.

What is does: it rebinds p and P in vim so that they indent at the correct level of indentation (even if you’re at the def or function line of a method and hitting p, something I do constantly) for your current context.

Install it today and see how it fits into your workflow. Also, if you haven’t honored Taco Tuesday, you have a few hours left to meet your weekly commitment.

Tags

vim: supertab

January 21, 2012

This week’s vim plugin is one I use every day (and an old one), so much that I often forget its a plugin, and think of it as part of vim. Its called supertab.

supertab binds the tab key in insert mode to autocompletion. Candidates for autocompletion come from all of the open buffers, so if you’re working with a class in one file, and want to refer to a method name or constant, you can start typing and then use TAB to avoid typing. Its also really useful for just quickly shrinking down method or variable typing.

If there’s only one autocompletion available, it will complete immediately, and if there are multiple, it will bring up a menu you can <tab> and <S-tab> through.

Tags

Vim: ZoomWindow

January 14, 2012

Today I wanted to mention a simple vim plugin I’ve been using and loving. Its calledZoomWindow and here’s how it works:

Imagine you have a set of windows split open, with a few files that are related to each other, and you’re occasionally referencing details in others, but primarily working only in one of the windows. A large part of your vim real estate is taken by these things you’re when only referencing them. Tabs are a decent approach to alleviate the problem, but prevent you from easily seeing things side by side, and clutter up your tab space.

ZoomWindow allow you to hit <c-w>o when in a window to make that window take over your entire session. Hitting <c-w>o again brings you back to the splits exactly as you left them.

The plugin is packaged as a vimball and can be found at vim.org. Enjoy!

Tags