

Vimroom - drKarl
http://projects.mikewest.org/vimroom/

======
jrockway
I wrote an xmonad layout manager that will make any application work like
this:

[https://github.com/jrockway/dotfiles/blob/master/xmonad/lib/...](https://github.com/jrockway/dotfiles/blob/master/xmonad/lib/AlmostFull.hs)

It looks something like:

<http://jrock.us/almostfull.png>

~~~
Adaptive
Awesome! I'll be using this. Have you submitted it for contrib?

------
cdelahousse
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
I'll take a look at getting it up to vim.org. Thanks for your interest!

~~~
mikewest
And now it's there: <http://www.vim.org/scripts/script.php?script_id=3766>

------
zzzmarcus
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
If you just want full-screen, it's ":set fullscreen" on MacVim, or ":set fu"
for short.

~~~
sunkencity
awesome.

:set nofu to get back

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

~~~
shazow
You can also do

    
    
        :set fu!
        :set paste!
    

Instead of nofu or nopaste.

~~~
nicholasjbs
Learn something new everyday. Thanks, shazow!

------
1336
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.

------
proppy
Found the same thing on emacs: <https://bitbucket.org/phromo/darkroom-mode/>

~~~
nyellin
See also: <http://www.emacswiki.org/emacs/WriteRoom>

------
swah
I can never focus on something long enough that this would become important.

------
pestaa
I didn't know I wanted something like this so much.

------
yesimahuman
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
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
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
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
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
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
How does this stand up when there are split windows? Is this mostly for single
window/terminal use?

~~~
dgl
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.)

~~~
mikewest
It is implemented using splits, so you're right: if you're already using split
windows then your results will be a bit off. :)

Regarding your settings, would you mind filing a bug report with some detail?
I'm happy to try to fix things if there's a bug:
<https://github.com/mikewest/vimroom/issues>

------
Hates_
The article mentions the same is possible in MacVim, but not how to do it. Any
pointers?

~~~
pssdbt
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.

~~~
bouncingsoul
Snapshot 61 added maxhorz and maxvert to fullscreen options by default. You
have to set fuoptions yourself if you want something different. See my other
comment for what I do.

------
jamesbritt
How does this compare to just having a desktop devoted to a single instance of
vim?

------
beagledude
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
Sumblime Text 2 has exactly this, very neat.

------
skeptical
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.

