top | item 3088290

Vimroom

167 points| drKarl | 14 years ago |projects.mikewest.org | reply

38 comments

order
[+] cdelahousse|14 years ago|reply
Could you please upload it to vim.org for posterity? http://www.vim.org/scripts/index.php

This'll get mirrored to the vimscripts github account and then let us install it via the Vundle vim package manager.

Thanks for the cool plugin!

[+] mikewest|14 years ago|reply
I'll take a look at getting it up to vim.org. Thanks for your interest!
[+] drKarl|14 years ago|reply
I'm not the author, just found it interesting and wanted to share with the community :)
[+] delluminatus|14 years ago|reply
you can install it with vundle anyway:

Bundle "mikewest/vimroom"

[+] zzzmarcus|14 years ago|reply
Nice! I recently started using Vim for prose and was mentally writing (in preparation for actually writing) a plugin that would do just this. I couldn't think of any better way to do it either, other than what you've done, setting up splits to the left and right. You've added some stuff that I hadn't thought of that makes it even nicer.

This is something else I use:

  function TextEdit()
    set spell
    set formatoptions=1
    set linebreak
    set wrap
    set nolist
    nnoremap j gj
    nnoremap k gk
    vnoremap j gj
    vnoremap k gk
    set guifont=Monaco:h16
  endfunction
  
  if has('autocmd')
    au BufRead,BufNewFile *.txt call TextEdit()
    au BufRead,BufNewFile *.markdown call TextEdit()
  endif
It gets paragraphs wrapping at words and and lets you move up and down by visual lines rather than actual lines. The last bit applies the settings automatically when opening a .txt or .markdown file. It looks like your plugin already does this, but maybe it would be useful for someone who wants a partial solution.
[+] bdr|14 years ago|reply
If you just want full-screen, it's ":set fullscreen" on MacVim, or ":set fu" for short.
[+] sunkencity|14 years ago|reply
awesome.

:set nofu to get back

My pet peeve with vim is the :set paste, :set nopaste things why not have :set paste false....

[+] te_chris|14 years ago|reply
cmd + return is the shortcut for fullscreen on MVim too.
[+] 1336|14 years ago|reply
Funny, I wrote a plugin earlier this year and came up with the exact same name. I never had time to polish and release it, but if you're interested, here's the source on GitHub:

https://github.com/mbadran/vimroom

The feature sets are different, from what I can tell.

[+] swah|14 years ago|reply
I can never focus on something long enough that this would become important.
[+] pestaa|14 years ago|reply
I didn't know I wanted something like this so much.
[+] yesimahuman|14 years ago|reply
What kind of visual distractions does Vimroom hide with the background color setting?

I must admit, having text centered like that is intriguing. I'm going to give this a try.

[+] sea6ear|14 years ago|reply
I wrote a color scheme/plugin to do something similar a while back (I think it's darkroom.vim on vim.org). Never really developed it fully. Ratings indicate people were underwhelmed :) Looks like this guy may have given the idea a much better treatment.
[+] funcused|14 years ago|reply
Instead of using splits you could set a large foldcolumn combined with word wrapping. Unless you are actually using folding it will result in a large area of blank space on the left of the window.
[+] xerxes2001|14 years ago|reply
Doesn't really work for me, but there is already an issue on GitHub for this. However, I don't really see the added value if you are using MacVim in the first place.
[+] mikewest|14 years ago|reply
The big advantage over MacVim is that Vimroom works from the terminal, anywhere. I can use the plugin no matter which machine I'm logged into, which is pretty valuable to me.

I fixed the only issue that was on the project before today (errors when mapping keys that were already mapped), and pushed a v0.7. I hope that fixes the issue you experienced.

[+] Amnon|14 years ago|reply
What I do is split the window vertically (C-w v), and resize the left window so that the text in the right window is centered on the screen.
[+] ineedtosleep|14 years ago|reply
How does this stand up when there are split windows? Is this mostly for single window/terminal use?
[+] dgl|14 years ago|reply
It appears to be implemented using split windows, so the results if you try and use split windows normally are somewhat surprising.

(It also doesn't work well with my settings as it shows a statusbar on some of these split windows acting as padding, so the effect is ruined slightly.)

[+] Hates_|14 years ago|reply
The article mentions the same is possible in MacVim, but not how to do it. Any pointers?
[+] pssdbt|14 years ago|reply
Also curious about this. Entering fullscreen used to do it correctly, but in the latest MacVim the document spans 100%, even if you have "Prefer native fullscreen support" unchecked.
[+] jamesbritt|14 years ago|reply
How does this compare to just having a desktop devoted to a single instance of vim?
[+] beagledude|14 years ago|reply
love this. I've been crafting my blog articles in vim lately as well and this will definitely make that a more pleasant experience.
[+] grimen|14 years ago|reply
Sumblime Text 2 has exactly this, very neat.
[+] skeptical|14 years ago|reply
vertical split with three windows, adjust their size to control the margins, and set the border to the same color as the background. Put these commands on your .vimrc. Should work too.