Is there a way to get gVim to show where wrapmargin is visually? I'm
thinking a line of |s down the screen or something... I'm editing a
number of files which need to be kept below 80 columns where possible,
but forcing a wrap isn't possible because occasionally I go over...
Cheers,
--
Ciaran McCreesh
mail: ciaranm*firedrop#org#uk
> Is there a way to get gVim to show where wrapmargin is visually? I'm
> thinking a line of |s down the screen or something... I'm editing a
> number of files which need to be kept below 80 columns where possible,
> but forcing a wrap isn't possible because occasionally I go over...
This is not possible, afaik.
But try to just resize your terminal to that width.
cu, Daniel
--
eat(this); // delicious suicide
> Is there a way to get gVim to show where wrapmargin is visually? I'm
> thinking a line of |s down the screen or something... I'm editing a
> number of files which need to be kept below 80 columns where possible,
> but forcing a wrap isn't possible because occasionally I go over...
I somewhere found a few lines for your .vimrc:
----- cut here -----
hi LineLenWarn ctermfg=yellow cterm=none
hi LineLenErr ctermfg=red cterm=none
syn match LineLenWarn /\%>80v./
syn match LineLenErr /\%>90v./
----- cut here -----
This will define two new highlighting types. The first colors all
characters in the columns 80-89 and the second all characters right of
them. You have to turn con syntax highlighting.
I had some problems with that (which i don't know anymore), but maybe it
will work for you.
greetings,
Juergen
> Hi,
>
> Is there a way to get gVim to show where wrapmargin is visually?
" aftereight(y) highlights text in yellow which is longer
" then 70 chars and in red when the text is longer than 80 chars
" by Noel Henson <no...@noels-lab.com>
" Message-ID: <KQRx9.106682$wG.4...@rwcrnsc51.ops.asp.att.net>
:syn match After70 /\%>70v./
:syn match After80 /\%>79v./
: hi After70 guibg=yellow
: hi After80 guibg=red
--
Peter
> > Is there a way to get gVim to show where wrapmargin is visually? I'm
> > thinking a line of |s down the screen or something... I'm editing a
> > number of files which need to be kept below 80 columns where possible,
> > but forcing a wrap isn't possible because occasionally I go over...
> I somewhere found a few lines for your .vimrc:
> ----- cut here -----
> hi LineLenWarn ctermfg=yellow cterm=none
> hi LineLenErr ctermfg=red cterm=none
> syn match LineLenWarn /\%>80v./
> syn match LineLenErr /\%>90v./
> ----- cut here -----
If you can live with the consequences of syntax highlighting getting
confused, I guess that is fine.
I'd recommend :match for this. The following would highlight characters
in column 81 through 90:
:match Todo /\%>80v\%<91v./
As you cannot use multiple :match commands, everything after the
highlighted characters will not be highlighted, though. Except for white
space, it should be clear enough that they are there, though.
If using :match, I'd recommend setting the 'list' option and tweak
'listchars' to mark the end of line somehow.
Peppe
--
se nocp cpo=BceFsx!$ sh=/bin/sh hid bs=2 ic scs hls ai isf-==
filetype plugin indent on | syn on | se lz ls=2 ru so=4
cno <C-A> <C-B>
omap S V/\n^-- $\\|\%$/<CR>