Thursday, December 31, 2009

Re: Darkroom like text placement

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


--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment