linda.s wrote:
After I set textwidth=78 in the .gvimrc and .vimrc, I opened my vim
editor and the cursor ends at column 68. Everytime I need manaually
drag the editor to make it column 78. Is there a way to make the
editor the desired size (column 78)?


'textwidth' is about where lines of text will be broken (by a hard end-of-line) if you type text without ever hitting the <Return> key. It has nothing to do with the width of the editor screen.

You can set 'lines' and 'columns' to the desired (vertical and horizontal, respectively) number of character cells from one edge of the editing area to the other, but if you use values which make the editor screen larger than your display screen, gvim will resize itself down.

This also means that by setting arbitrary large values what one gets is, in effect, a maximized window: my vimrc includes (among other things)

if has("gui_running")
        if has("gui_gtk2")
                set guifont=Bitstream\ Vera\ Sans\ Mono\ 9
        elseif [...]
        [...]
        endif
        [...]
        set lines=99999 columns=99999
else
[...]
endif

but I end up with "only" 48 lines by 142 columns because anything more would be bigger than the display (1024x768 pixel, 30x23 cm, minus about 18 mm at the bottom for the taskbar).


Best regards,
Tony.
--
People who have what they want are very fond of telling people who
haven't what they want that they don't want it.
                -- Ogden Nash

Reply via email to