issue with textwidth and wrap

12 views
Skip to first unread message

Srinath

unread,
Oct 16, 2009, 5:51:38 PM10/16/09
to vim_mac
I have updated to snapshot 50 on Snow Leopard. My wrap has stopped
working.
I have moved my own ".vimrc, gvimrc and .vim/" away. Thus, I think
I'm running mac_vim with only included setup files. I do not get the
proper functionality from "set wrap" + "set tw=20", as my test.
Any help is appreciated.

björn

unread,
Oct 17, 2009, 6:33:50 AM10/17/09
to vim...@googlegroups.com
2009/10/16 Srinath:

Hi Srinath,

Describe the problem and how to reproduce it, then tell us what goes
wrong and what you expected to happen and maybe somebody can help you
out. (What does "stopped working" mean? What is the "proper
functionality"? etc.)

Björn

Srinath

unread,
Oct 19, 2009, 11:20:34 AM10/19/09
to vim_mac
I want to use the line wrap mechanism usually done by :
:set wrap
:set textwidth=20
This would normally allow for one to type upto 20 characters on one
line and then have it continue on the next.

I removed all of my user setting files and directories to make sure a
plugin was not interfering.

This seems to not happen with snapshot 50. I invoke the 2 commands
above and type characters and they continue for ever on one line.

Is there a way in MacVim and vim to see what are all the global
settings loaded?

Thank you,
<>Srinath

Srinath

unread,
Oct 20, 2009, 7:21:51 PM10/20/09
to vim_mac
I have found away to get the formatting I want with out line wrap.
Using:
!}fmt -80
will make the current paragraph formatted to 80 column.
!Gfmt -80
will format the rest of the file to 80 column width.

Tony Mechelynck

unread,
Nov 15, 2009, 5:33:29 PM11/15/09
to vim_mac
On Oct 19, 4:20 pm, Srinath <srinath.vadlam...@gmail.com> wrote:
> I want to use the line wrap mechanism usually done by :
> :set wrap
> :set textwidth=20
> This would normally allow for one to type upto 20 characters on one
> line and then have it continue on the next.
>
> I removed all of my user setting files and directories to make sure a
> plugin was not interfering.
>
> This seems to not happen with snapshot 50.   I invoke the 2 commands
> above and type characters and they continue for ever on one line.
>
> Is there a way in MacVim and vim to see what are all the global
> settings loaded?
>
> Thank you,
> <>Srinath

To see which settings are not at their defaults, use

:set

wih no arguments. To see all settings _including_ those still at their
defaults, use

:set all

However, 'wrap' and 'textwidth' have nothing to do with each other.
'wrap' will wrap your lines (without breaking them) at the window
margin, onto several "screen" lines per "file" line if necessary,
possibly in the middle of a word, and with absolutely no regard for
the value of 'textwidth'. 'textwidth' defines where Vim will _break_
lines (but usually only comment lines, not code lines) when you type
them. Where 'textwidth' will exert its influence is further defined by
the 'formatoptions' setting (see ":help fo-table").

Note that the help says 'formatoptions' defaults to "tcq" if
'nocompatible', "vt" if 'compatible', however there are filetype-
plugins for various 'filetype's which set (locally, on files of that
filetype) a different value.


Best regards,
Tony.
--
If life is a stage, I want some better lighting.
Reply all
Reply to author
Forward
0 new messages