I have installed spf13-vim plugin and when I set :color molokai the following orange highlighting occurs;
Does anyone know which setting I need to change to disable the highlighting?
It's not the result of a search, that was my first guess! It doesn't seem confined to any one particular object type either as you can see from the picture.
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.
PS: Vim "distributions" like spf-13 and Janus lure you with a quick install and out-of-the-box settings, but you pay the price with increased complexity (you need to understand both Vim's runtime loading scheme and the arbitrary conventions of the distribution) and inflexibility (the distribution may make some things easier, but other things very difficult). Vim is incredibly customizable, using someone else's customization makes no sense.
Related
I have tried well over 15 different colorschemes for vim. I have made all of the correct settings for full color support in terminal. This 'problem' persists in both terminal and gvim. Perhaps it is not a bug and simply the design of the colorschemes themselves, but only one colorscheme I have tried actually has decent highlight support. For example:
In this python class all of the colorschemes will only highlight a couple of things.
wombat only highlights comments and the if.
molokai is extremly dissapointing but at least gets the ints
All of the themes I try are similar to these two except 'Crayon' which compares like so:
Most of the vim color-scheme github pages show previews with highlight support compared to crayon. My question is what might be causing this problem? or is this just the design of the themes themselves?
Syntax highlighting is the combination of two things:
syntax definition, provided by syntax scripts typically found in syntax/ or after/syntax/,
highlighting definition, provided by colorschemes typically found in colors/.
The former defines syntax groups, the latter defines how those groups look.
But those almost never come in pairs so there's no guarantee whatsoever that every possible syntax group is properly handled by every possible colorscheme.
If a colorscheme you like doesn't handle some of the syntax groups you expect it to handle, open an issue or (better) patch it.
So I have been using spf13-vim recently, and I have tried changing the default colorscheme, but for some reason when I do I get strange highlighting of words. The highlighting seems to depend on the filetype such that my .txt and .py file will look different.
As an example, the following image shows the highlighting effect on headnode, clusterRun, bwa, and vt. This only occurs when I alter the colorscheme from default. So is there a way to stop this from happening?
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.
If you cannot find the highlighting this way, it may be spell checking; this goes on top of the syntax highlighting. You can list the corresponding highlight groups via
:hi SpellBad | hi SpellCap | hi SpellLocal | hi SpellRare
If you don't want spell checking,
:set nospell
turns it off.
Soap Box
Vim "distributions" like spf-13 and Janus lure you with a quick install and out-of-the-box settings, but you pay the price with increased complexity (you need to understand both Vim's runtime loading scheme and the arbitrary conventions of the distribution) and inflexibility (the distribution may make some things easier, but other things very difficult). Vim is incredibly customizable, using someone else's customization makes no sense.
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.
I scoured Google and SO for an answer but really couldn't find one, probably because I don't know the real name of these things.
annoying gutter
These gutters indicate nesting levels and folding options with little pluses and minuses and are completely useless to me, and take up a lot of spaces especially when working in split viewports.
Do you know how to get rid of them?
FYI I'm using the Janus distribution
That "gutter" is the fold column. You can turn it off via
:set foldcolumn=0
However, this usually is set by a plugin or a filetype plugin, so it will probably reoccur. You can find out who did this via
:verbose set foldcolumn?
If it's been set up by a filetype plugin foo, you can put the command to turn it off into .vim/after/ftplugin/foo.vim. If it's a plugin, read up on its documentation. (That's the downside of pre-made Vim distributions like Janus!)
I'm making a colorscheme for Vim and have a command that allows me to view the 'scope' of a attribute to highlight, but I need some of the general attributes (background, line numbers, etc.) so I can properly create my scheme. Is there any good cheat sheets or lists of some of the attributes? I checked all the Vim documentation and wikis but they don't list many things that affect the editor itself.
Yes, there is such a list. All you need is in Vim's awesomely-exhaustive-but-sometimes-cryptic documentation: :help syntax, more specifically :help highlight-default for a list of default highlight groups. If something is not there it probably means that it can't be done or that it's custom/syntax-dependant.
You could also open a pre-existing colorscheme and see how it's done. It's actually not that complicated to understand how the syntax works.
Good luck and make sure to share your colorscheme with the community when it's ready.
May be you'll find useful this colorscheme: http://www.vim.org/scripts/script.php?script_id=106 .
Here is the description given by author:
The philosophy here is to provide a ready-to-uncomment list of highlight commands for all the important groups. Then you can deviate from the default until you come up with one you like.