Vim bracket and semicolon highliting - vim

Sometimes vim highlights brackets or semicolon with red color. What plugin highlights it? Does it mean error in this place? Look on a picture please.

Yes, for the default syntax highlighter, it means that vim has flagged something wrong with that location. Check out :help syntax for more options. As #romainl stated, other plugins may be affecting what you see.
I have a vanilla Cygwin version running and it flags a few brackets in your css snippet as being invalid either due to missing opening/closing brackets or bad syntax as vim defines it.

Related

Macvim subtle comment keywords

Comments keyword are damn highlighted in Macvim/terminal vim and keeps on irritating me. I am not a pro in customizing vim, but really want to get rid of them and have subtle grey keywords
You need to find out which syntax group causes the highlighting. :syn list shows all active groups, but it's easier when you install the SyntaxAttr.vim - Show syntax highlighting attributes of character under cursor plugin. When you have the name of the offending syntax group, you can investigate where it comes from; (the last lines of) :scriptnames may help.
One solution in your case would be linking the syntax groups to the original Comment group, so that the distinction is lost. This can be done in ~/.vimrc:
:hi link FoundSyntaxGroupHere Comment
Comments were highlighted because of vim javascript plugin and by setting following inside .vimrc file, i am able to stop my comments from getting highlighted
let g:javascript_ignore_javaScriptdoc="1

Vim wrong syntax highlighting in Groovy

when I do the single slash (/) when typing some arithmetic expression (like val1 / val2), my vim treats it as a comment for multiple lines (/*). The result looks like:
I now I can escape it by typing ;/ at the end of that line (which closes the comment), but it is still annoying and I'd like for my vim to behave properly :).
I've tried using another vim syntax highlighting package for groovy, I've tried :filetype plugin off in my .vimrc, I've tried purging vim with my settings and reinstalling it and the problem is still there.
SOLUTION:
As pointed out by #cfrick, vim (my version: 7.4) treats '/' as beginning of regular expression in groovy. The solution is to edit
/usr/share/vim/vim74/syntax/groovy.vim
And around line 260-261 there is
syn region groovyString start='/[^/]' end='/' contains=groovySpecialChar,groovyRegexChar,groovyELExpr
Just change the start to
start='/[^*/]'
Edit: changed space in regexp to * as #calid suggested in comment below
start='/[^ /]'
(that is add the space there.)
And now it looks much better. On the other hand it will now not highlight regexps starting with space, but for me it's okay. At least it's much better than what it was.
This helped mi a lot with finding my solution:
Groovy syntax highlighting in Vim 7.4

Search highlighting (hlsearch) not working in vim

I have a problem with search highlighting in vim. I have used it before but currently it does not work at all.
I have entered :set hlsearch, which is also in my .vimrc file.
I have entered :set hlsearch? and the result is hlsearch, indicating that I have successfully turned the option on. (right?)
I am running vim and not vi, so that is not the problem.
I have searched around but only found people asking about turning OFF search highlighting.
I would appreciate any input as this has been driving me nuts. Thanks!
Edit: highlighting also doesn't work for spellcheck, so evidently it's something global about highlighting.
When you have problems with multiple highlightings (like search and spell in your case), first check the defined highlightings with
:hi
If any groups are wrong or off, check your :colorscheme, and maybe try another.
In the console, color problems are often related to the number of available colors, a hairy problem. Check with
:set t_Co?
Another good tool for checking problems with individual syntax items is the SyntaxAttr.vim - Show syntax highlighting attributes of character under cursor plugin.

vim editor error color

I am using Vim 7.3 on Ubuntu. Problem is - whenever I got some error in my code, that error is marked with white color. I can't see anything underneath that color. So if I have typo error (missing one brace) it will mark that brace with white, but I wont be able to see that mistake ( it is covered with color ). Sometimes it marks all line. I am using Molokai color scheme.
I tried to change color scheme, but nothing happens. I suppose that error color is coming from the vim native settings.
Any ideas how to fix this?
The
:hi
command lists all defined highlightings. Find the one with the white color (for errors, this should be Error), and change it (see :help :highlight) in your ~/.vimrc, e.g.:
:hi Error ctermfg=Red guifg=Red
If highlighting is the issue, then you can easily and quickly turn off all highlighting by typing ":noh" (without the quotes) from command mode. This will temporarily turn off highlighting. This also works for getting rid of highlighting after a search (which really annoys me because like your problem here, I can't read the text when it's highlighted).
If you haven't already, you should create a file in your home directory named ".vimrc", so pathing it out would be "~/.vimrc". This is the what #mtk is referring to (just in case you don't know that already. Some people at work use Vim but don't know about the .vimrc file).

Weird VIM colorscheme, I don't know what's going wrong in my configuration

I got a weird vim interface, please take a look at the following image:
How can I remove those red blocks? It's not highlighted search.
What I did is switch from Gentoo to Arch, my ~/.vimrc remain unchanged.
Many thanks!
Looks like you've got spell-checking enabled.
:set nospell
If you want to find who set 'spell' (it's off by default), use:
:verbose set spell?
There's a syntax file that has those strings in it, telling the colorscheme to color them in some special way. The colorscheme defines that special way to be utterly hideous. :)
If you want that text highlighted, just differently, you'll need to edit your colorscheme. If you don't want that text highlighted, you need to remove them from the syntax definition.
Unfortunately I don't know much about that stuff as I'm mostly happy with the defaults on Windows...

Resources