VimRoom

I do most of my writing in Vim, because I’m a big nerd. It does most of what I want a writing environment to do, but I miss some of the “distraction free" features of the quite exceptional WriteRoom. Fullscreening Vim means that text ends up flat up against the left side of my monitor, but I’d much prefer it to be centered. I’d also like a little of the visual clutter to fade away. In other words, instead of this:

Screenshot of Vim, without VimRoom active

I’d like to work in this:

Screenshot of vim, with VimRoom active

Some of this is possible with MacVim, but I’d rather do as much as possible in a platform-independent way. So, command-line Vim it is.

Installation

I think the best way to install Vim plugins is via Tim Pope’s Pathogen. Using that plugin, you can simply clone the VimRoom repository into your bundles directory, and you’re done.

Without Pathogen, installation is almost as trivial: simply copy ./plugins/vimroom.vim from the repository into your plugins directory. That’s it!

Configuration

By default, VimRoom binds <Leader>V to <Plug>VimroomToggle, and sets up an 80 column workspace with at least 5 columns of space on either side (it doesn’t help at all to have single-column sidebars, you see), and 3 lines of space above and below. It assumes a black background when hiding visual distractions. As of v0.4, VimRoom also sets up a :VimroomToggle command that has the same effect.

Changing any of these assumptions is a simple matter of setting variables in your .vimrc.

You can bind the <Plug>VimroomToggle function to any key combination you like via the usual mechanisms. For example:

nnoremap <silent> <Leader>mz <Plug>VimroomToggle

Would bind the function to <Leader>mz. Trivial, right?

And that’s it!

Changelog