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.
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:
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.
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.
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.
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.
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.)
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.
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.
[+] [-] jrockway|14 years ago|reply
https://github.com/jrockway/dotfiles/blob/master/xmonad/lib/...
It looks something like:
http://jrock.us/almostfull.png
[+] [-] Adaptive|14 years ago|reply
[+] [-] cdelahousse|14 years ago|reply
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
[+] [-] drKarl|14 years ago|reply
[+] [-] delluminatus|14 years ago|reply
Bundle "mikewest/vimroom"
[+] [-] zzzmarcus|14 years ago|reply
This is something else I use:
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
[+] [-] sunkencity|14 years ago|reply
: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
[+] [-] 1336|14 years ago|reply
https://github.com/mbadran/vimroom
The feature sets are different, from what I can tell.
[+] [-] proppy|14 years ago|reply
[+] [-] nyellin|14 years ago|reply
[+] [-] swah|14 years ago|reply
[+] [-] pestaa|14 years ago|reply
[+] [-] yesimahuman|14 years ago|reply
I must admit, having text centered like that is intriguing. I'm going to give this a try.
[+] [-] sea6ear|14 years ago|reply
[+] [-] funcused|14 years ago|reply
[+] [-] xerxes2001|14 years ago|reply
[+] [-] mikewest|14 years ago|reply
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
[+] [-] ineedtosleep|14 years ago|reply
[+] [-] dgl|14 years ago|reply
(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
[+] [-] bouncingsoul|14 years ago|reply
[+] [-] drKarl|14 years ago|reply
[+] [-] pssdbt|14 years ago|reply
[+] [-] jamesbritt|14 years ago|reply
[+] [-] beagledude|14 years ago|reply
[+] [-] grimen|14 years ago|reply
[+] [-] skeptical|14 years ago|reply