linda.s wrote:
On 5/7/07, Michael Henry <[EMAIL PROTECTED]> wrote:
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)?
Linda,
Have a look at the 'columns' variable (:help 'columns). It controls the
width of your window. The 'textwidth' variable controls the column at
which your text will wrap for things like the "format lines" command
(:help gq), and it sets the maximum width of text that will be inserted
(longer lines will be broken at whitespace).
Try this in your .gvimrc:
set columns=78
I set columns=78 but when I opened vim editor, I found the editor's
column size to be 70. Why?
maybe because these 70 columns take up the full width of your display? (You
aren't using "stuff in the margin" like numbers or signs, or vertically split
windows, are you?)
If that's the case, try a smaller 'guifont' (and set it _before_ 'lines' and
'columns').
In Windows, you could also use ":winpos 0 0" to move the window to the topleft
corner.
IOW:
if has("gui_running") " console Vim can't always resize
" WARNING: the following two lines are for Windows not Unix
winpos 0 0 " move Vim to top left
set gfn=Lucida_Console:h8:cDEFAULT " don't set too big a font
set columns=80
set lines=99999 " use the full display height
endif
set tw=78 " format new text (or gq<motion>) at column 78
Best regards,
Tony.
--
Keep emotionally active. Cater to your favorite neurosis.