Darkroom like text placement

224 views
Skip to first unread message

Aleksey

unread,
Dec 31, 2009, 9:14:23 AM12/31/09
to vim_use
What I want to achieve is text placement in buffer similar to Darkroom/
WriteMonkey/Ommwrite/etc

Vim window maximized, buffer text with large fields on left/right,
auto wrapping to next line without inserting linebreaks.
Is it possible?

Thanks

Tim Chase

unread,
Dec 31, 2009, 9:58:50 AM12/31/09
to vim...@googlegroups.com
Aleksey wrote:
> What I want to achieve is text placement in buffer similar to Darkroom/
> WriteMonkey/Ommwrite/etc

Not having used any of these editors, I can only go by your
description and what I've anecdotally heard about it being a
full-screen distraction-removal editor. :)

> Vim window maximized,

Usually this is a function of your window manager, whether the
Windows/Mac/X "Maximize" button, or in some X window-managers
such as Fluxbox (many others do too...I just happen to use flux)
have the ability to map a keys to toggle window chrome and
maximize the window and then remember that at startup of the app.
I usually use (non-g)vim in a chromeless xterm which starts up at
80x25 but I can maximize vertically, horizontally, or both with a
single key-chord.

That said, you can use a combination of :winpos and
'lines'/'columns' to have vim move and resize to right-ish
dimensions in gvim.

:winpos 0 0
:set lines=68 columns=140

> buffer text with large fields on left/right,

On the left, you can either number your lines and set the
number-column width:

:set number numberwidth=8

or you can fudge it using foldcolumns:

:set foldcolumn=8

Right margin is a lot harder to implement without inserting
linebreaks (which you mention you don't want), but if linebreaks
were okay, you could use the 'wrapmargin' setting.

> auto wrapping to next line without inserting linebreaks.

:set wrap wrapmargin=0 textwidth=0 linebreak

> Is it possible?

Mostly? :) You can read more details about them at

:help :winpos
:help 'lines'
:help 'columns'
:help 'number'
:help 'numberwidth'
:help 'foldcolumn'
:help 'wrap'
:help 'wrapmargin'
:help 'textwidth'
:help 'linebreak'

Hope this helps,

-tim


Christian Brabandt

unread,
Dec 31, 2009, 11:04:15 AM12/31/09
to vim_use
Hi Aleksey!

Though, I don't know neither of these editors, I think this topic came
up once on this list and I think I once used a similar solution for
Windows. I don't have it anymore, but the almighty oracle knows about
it:
http://groups.google.com/group/vim_use/msg/1f600508b4fd6b38

regards,
Christian
--
hundred-and-one symptoms of being an internet addict:
43. You tell the kids they can't use the computer because "Daddy's got work to
do" and you don't even have a job.

Reply all
Reply to author
Forward
0 new messages