uncontrolled colors/highlight

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

uncontrolled colors/highlight

Vlad Ghitulescu
Hello!


In this example:

---
... Juli: 2. + 9. Juli
intreab-o pe Natalia daca vine pe 2 sau pe 9 iulie
[hidden email]
Danke im voraus!
... werde ich vorraussichtlich (hoffentlich!!!) ab 15. Juli
... bin und die ...
---

are some words colored/highlighted ("2. + 9.", "-o pe", "pe", ".de", "im",
"vorraussichtlich", "ab 15.", "und").

Why?

Where can I find this settings (surely not in the syntax-files, where I've
already searched for).


Regards,
Vlad

--
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++
Reply | Threaded
Open this post in threaded view
|

Re: uncontrolled colors/highlight

Bram Moolenaar

Vlad Ghitulescu wrote:

> In this example:
>
> ---
> ... Juli: 2. + 9. Juli
> intreab-o pe Natalia daca vine pe 2 sau pe 9 iulie
> [hidden email]
> Danke im voraus!
> ... werde ich vorraussichtlich (hoffentlich!!!) ab 15. Juli
> ... bin und die ...
> ---
>
> are some words colored/highlighted ("2. + 9.", "-o pe", "pe", ".de", "im",
> "vorraussichtlich", "ab 15.", "und").
>
> Why?
>
> Where can I find this settings (surely not in the syntax-files, where I've
> already searched for).

Please mention what version of Vim you are using and what your settings
are.  Especially the 'syntax' option is relevant.

--
hundred-and-one symptoms of being an internet addict:
107. When using your phone you forget that you don't have to use your
     keyboard.

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///
Reply | Threaded
Open this post in threaded view
|

Re: uncontrolled colors/highlight

Vlad Ghitulescu
> --- Urspr?ngliche Nachricht ---
> Von: Bram Moolenaar <[hidden email]>
> An: "Vlad Ghitulescu" <[hidden email]>
> Kopie: [hidden email]
> Betreff: Re: uncontrolled colors/highlight
> Datum: Tue, 21 Jun 2005 13:19:07 +0200
>
>
> Vlad Ghitulescu wrote:
>
> > In this example:
> >
> > ---
> > ... Juli: 2. + 9. Juli
> > intreab-o pe Natalia daca vine pe 2 sau pe 9 iulie
> > [hidden email]
> > Danke im voraus!
> > ... werde ich vorraussichtlich (hoffentlich!!!) ab 15. Juli
> > ... bin und die ...
> > ---
> >
> > are some words colored/highlighted ("2. + 9.", "-o pe", "pe", ".de",
> "im",
> > "vorraussichtlich", "ab 15.", "und").
> >
> > Why?
> >
> > Where can I find this settings (surely not in the syntax-files, where
> I've
> > already searched for).
>
> Please mention what version of Vim you are using
6.3 (2004 June 7) / MSWindows XP


> and what your settings
> are.  
here they are, all my settings:
---
version 6.0
set nocompatible
let s:cpo_save=&cpo
set cpo&vim
cnoremap <C-F4> c
inoremap <C-F4> c
cnoremap <C-Tab> w
inoremap <C-Tab> w
cmap <S-Insert> +
map! <xHome> <Home>
map! <xEnd> <End>
map! <S-xF4> <S-F4>
map! <S-xF3> <S-F3>
map! <S-xF2> <S-F2>
map! <S-xF1> <S-F1>
map! <xF4> <F4>
map! <xF3> <F3>
map! <xF2> <F2>
map! <xF1> <F1>
imap <S-Insert> 
imap <C-PageDown> L$
imap <C-PageUp> H
noremap  gggHG
vnoremap  "+y
noremap  
nnoremap  :update
vnoremap  :update
onoremap  :update
nmap  "+gP
omap  "+gP
vnoremap  "+x
noremap  
noremap  u
cnoremap ? :simalt ~
inoremap ? :simalt ~
map Q gq
vnoremap p :let current_reg = @"
gvs=current_reg

map saveconfig :mkvimrc vim-config
nmap <S-Insert> "+gP
nmap <C-PageDown> L$
nmap <C-PageUp> H
noremap <C-F4> c
noremap <C-Tab> w
vmap <S-Insert> 
vnoremap <BS> d
map <xHome> <Home>
map <xEnd> <End>
map <S-xF4> <S-F4>
map <S-xF3> <S-F3>
map <S-xF2> <S-F2>
map <S-xF1> <S-F1>
map <xF4> <F4>
map <xF3> <F3>
map <xF2> <F2>
map <xF1> <F1>
vmap <C-Del> "*d
vnoremap <S-Del> "+x
vnoremap <C-Insert> "+y
omap <S-Insert> "+gP
vmap <C-PageDown> L$
vmap <C-PageUp> H
cnoremap  gggHG
inoremap  gggHG
inoremap  :update
cmap  +
inoremap  
inoremap  u
noremap ? :simalt ~
let &cpo=s:cpo_save
unlet s:cpo_save
set autoindent
set backspace=2
set backup
set diffexpr=MyDiff()
set history=50
set keymodel=startsel,stopsel
set ruler
set selection=exclusive
set selectmode=mouse,key
if &syntax != 'help'
set syntax=help
endif
set whichwrap=b,s,<,>,[,]

"
" ab hier neu
--------------------------------------------------------------------------------
"
       
set guifont=Courier_New:h11:cANSI
set lines=45
set columns=114
set incsearch
set hlsearch
:nnoremap <CR> :noh<CR>/<BS>
set ignorecase
set number
set shiftwidth=4
set tabstop=4
set expandtab
set clipboard=unnamed
set linebreak
set textwidth=72
set formatoptions+=r
colorscheme simpleandfriendly
" ACHTUNG!
set syntax=sql
set syntax=vim
map <F7> <C-b>
map <F8> <C-f>
map m<F7> gg
map m<F8> G

"
" Makro's & Functions -------------------------------------------------
"

" Search in a specific column and count the hits  ---------------------
fu! ColMatchCount(col,patt)
      let n=0
      :exe 'g/\%'.a:col.'c'.a:patt."/let n=n+1"
      echo " String <".a:patt."> occurs ".n." times in the column
>".a:col."<."
endfunction

:com! -nargs=* FCAll call ColMatchCount(<f-args>)
" REMEMBER!
"    1.- ;; or \
"    2.- space
"    3.- # (column, where to search)
"    4.- space
"    5.- string (what to search)
map ;; :FCAll
map \ :FCAll

" Search and count the hits  ------------------------------------------
fu! MatchCount(patt)
      let n=0
      :exe 'g/'.a:patt."/let n=n+1"
      echo " String <".a:patt."> occurs ".n." times."
endfunction

:com! -nargs=* FAll call MatchCount(<f-args>)

map ;;; :FAll
" REMEMBER!
"    1.- ;;;
"    2.- space
"    3.- string (what to search)

"
" ab hier test *** --- *** --- *** --- *** --- *** --- *** --- *** --- ***
--- *** --- *** ---
"
---


> Especially the 'syntax' option is relevant.
once again:

set syntax=sql
set syntax=vim

--
Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
Reply | Threaded
Open this post in threaded view
|

Re: uncontrolled colors/highlight

Tim Chase-2
In reply to this post by Vlad Ghitulescu
One of the things I noticed in your configuration is that you
have multiple lines using "set syntax="

The first:

if &syntax != 'help'
set syntax=help
endif



The second & third are even back-to-back

" ACHTUNG!
set syntax=sql
set syntax=vim

with an apt "Achtung!" to let you know this is silly :)

If it's neither of these that is triggering it, I've got a couple
ideas as to which it might be.  My first suspect is good-old
"highlight search".

Try the Ex command

        :noh

and see if they go away.  If they do, then you've likely got
highlight searching turned on, and the last results from your
search were highlighted.  If you like this behavior, but want to
turn it off on a case-by-case basis, you can simply use the above
"noh" command.  If, however, it bugs you, and you want to kill it
more long-term, you can add a line to your vimrc that reads

        set nohls


If, however, the above "noh" command doesn't solve the problem,
then it *is* syntax-file related.  Likely, the last one set,
which according to the file(s) you sent, looks to be the "vim"
syntax.

I'd personally remove any & all setting of the "syntax" in one's
vimrc file, and let the usual detection methods do their thing.
It's usually much more accurate, and you can override them on a
per-file basis if you need, at the time you load them.  E.g.  I
have some VB files that have a .INC extension, which
filetype-detection determines is a POV file and tries to color as
such.  I simply override for those particular files, forcing "set
syntax=vb" and it works fine.  The autodetection works darn well
for the rest of the files I use.

-tim





Reply | Threaded
Open this post in threaded view
|

Re: uncontrolled colors/highlight

Vlad Ghitulescu
Hello, Tim!


The :noh doesn't help.
I'd tested the both "set syntax" commands and discovered, that the "set
syntax=vim" was it :-\
Well, now it's everything ok :)

Thanks!

Vlad


> --- Urspr?ngliche Nachricht ---
> Von: Tim Chase <[hidden email]>
> An: Vlad Ghitulescu <[hidden email]>
> Kopie: [hidden email]
> Betreff: Re: uncontrolled colors/highlight
> Datum: Tue, 21 Jun 2005 07:34:30 -0500
>
> One of the things I noticed in your configuration is that you
> have multiple lines using "set syntax="
>
> The first:
>
> if &syntax != 'help'
> set syntax=help
> endif
>
>
>
> The second & third are even back-to-back
>
> " ACHTUNG!
> set syntax=sql
> set syntax=vim
>
> with an apt "Achtung!" to let you know this is silly :)
>
> If it's neither of these that is triggering it, I've got a couple
> ideas as to which it might be.  My first suspect is good-old
> "highlight search".
>
> Try the Ex command
>
> :noh
>
> and see if they go away.  If they do, then you've likely got
> highlight searching turned on, and the last results from your
> search were highlighted.  If you like this behavior, but want to
> turn it off on a case-by-case basis, you can simply use the above
> "noh" command.  If, however, it bugs you, and you want to kill it
> more long-term, you can add a line to your vimrc that reads
>
> set nohls
>
>
> If, however, the above "noh" command doesn't solve the problem,
> then it *is* syntax-file related.  Likely, the last one set,
> which according to the file(s) you sent, looks to be the "vim"
> syntax.
>
> I'd personally remove any & all setting of the "syntax" in one's
> vimrc file, and let the usual detection methods do their thing.
> It's usually much more accurate, and you can override them on a
> per-file basis if you need, at the time you load them.  E.g.  I
> have some VB files that have a .INC extension, which
> filetype-detection determines is a POV file and tries to color as
> such.  I simply override for those particular files, forcing "set
> syntax=vb" and it works fine.  The autodetection works darn well
> for the rest of the files I use.
>
> -tim
>
>
>
>
>

--
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++
Reply | Threaded
Open this post in threaded view
|

Re: uncontrolled colors/highlight

Charles E Campbell Jr
In reply to this post by Vlad Ghitulescu
Quoting Vlad Ghitulescu <[hidden email]>:


> > Vlad Ghitulescu wrote:

> > > Where can I find this settings (surely not in the syntax-files, where
> > I've
> > > already searched for).
> >
> > Please mention what version of Vim you are using
> 6.3 (2004 June 7) / MSWindows XP
>
>
> > and what your settings
> > are.
> here they are, all my settings:
> ---
> version 6.0
> set nocompatible
...snip...



> if &syntax != 'help'
> set syntax=help
> endif
...snip...

> " ACHTUNG!
> set syntax=sql
> set syntax=vim

Hello!

Setting syntax repeatedly like this strongly implies that you misunderstand
the syntax highlighting mechanism.  My advice: remove all these syntax lines.
What they're doing is overriding the automatic syntax highlighting type
detection; only the last setting is active.  In this case, you're telling
vim that all files should be highlighted as if they were *.vim files.
You're *not* telling vim that you want help, sql, and vim highlighting
available, which is what I'm guessing you intended.

One thing for syntax highlighting you should have in your <.vimrc> is:

syntax on

You may want a colorscheme, too; there's quite a few on http://vim.sf.net/
available, including packages of them.

Regards,
Chip Campbell