Hot answers tagged

11

If your highlighting is like mine then that would be a SpellLocal error. SpellLocal Word that is recognized by the spellchecker as one that is used in another region. And... A word may be spelled differently in various regions. For example, English comes in (at least) these variants: en: all regions en_au: Australia ...


7

tl;dr: My path was using the an old Vim version, with v8.1.428 we have full 24-bit glorious colours in Vim in the Windows Console! See below for screenshots. Err, so there was a basic mistake on my part. I still had my system environment path pointing to my Git SCM installation C:\Program Files\Git\usr\bin (which contains an older version of Vim) and on top ...


5

This is not too complicated. Try this: syn match delimited /\\note{\_.\{-}}/ containedin=ALL hi delimited guifg=red ctermfg=red Of course, you can change red to whatever color you want. Note that this does what you asked for, but it might also do much more than what you asked for because you didn't provide a lot of detail about what exactly you want to ...


5

You're probably overlooking the additional attributes set in the cterm= field for those highlights. For instance, after I set ctermfg=black ctermbg=white for StatusLine, I get this when I query it: :hi StatusLine StatusLine xxx term=bold,reverse cterm=bold,reverse ctermfg=0 ctermbg=15 gui=bold,reverse You'll see the cterm=bold,...


5

Looking through the color settings in the theme, it's only defining the full color range for the GUI, and is using the default 16 terminal colors. Your screen shot appears to be using fairly standard terminal colors, so I am going to assume that you are running in a terminal. If you are editing local files, the easiest way to get the full color scheme ...


4

In your Vim config, you can do the following (change the colors and styling to your liking): function! ConflictsHighlight() abort syn region conflictStart start=/^<<<<<<< .*$/ end=/^\ze\(=======$\||||||||\)/ syn region conflictMiddle start=/^||||||| .*$/ end=/^\ze=======$/ syn region conflictEnd start=/^\(=======$\||||||| |\)...


4

Those are ANSI escape sequences which are commonly used to print colored text in terminal windows. If valid sequences are being inserted into Vim buffers then you'll be happy to know that there's a plugin that will translate to Vim highlighting/colors: AnsiEsc Here's are basic examples of the concepts... Using something close to one of your samples this ...


4

It indeed looks like cppOperator links to Operator which links to Statement (-> :hi cppOperator), but I've never seen these operators displayed differently... It's just for the keywords. See syn list cppOperator. I guess you'd have to add these symbols to the cppOperator list. You may need a syn match that takes care of not overlapping with cFloat and some ...


4

You need to do this in two steps. You got the first one right by setting list and listchars. The problem comes when you apply the highlight: you cannot combine the commands the way you are trying to do (as far as I know). As Matt pointed in his comment, the highlight group responsible for listchars characters is SpecialKey. set list set listchars=tab:→\ ,...


3

You can execute :setfiletype markdown inside vim. If you edit this file often and always want it to be recognized as markdown you can add a modeline to it. Put this like at the top or bottom of the file (yes it should be a HTML comment): <!-- vim: set ft=markdown: --> Background: In order to understand more about these concepts you can read :help ...


3

The highlight group is hi gitcommitOverflow. however it's part of vim's built-in syntax file gitcommit.vim, not in any way part of fugitive (besides having the same maintainer). Strangely, it looks like it was intended to be linked to Error by default but this was commented out. "hi def link gitcommitOverflow Error Putting this line in your custom ...


3

Try combination of :h echohl and :h echon: :echohl Statement | echon "Hello " | echohl Identifier | echon "World" | echohl None | echon "!!!" echohl will apply highlight group to the next echo, echon or echomsg, but if you want to apply highlighting to a part of your message you should use echon. To have all your message in ...


3

There are a number of plugins that do this for colour names, hex colours, and RGB colours: Colorizer by Christian Brabandt, (who appears to be modestly refraining from answering this question with a link to his own plugin), Coloresque by Konstantin, vim-css-color by Aristotle Pagaltzis, vim-css-color (a different one) by Max Vasiliev


3

You can only change GUI vim cursor color in vim: augroup tune_colors | au! au ColorScheme * hi Cursor guibg=red guifg=white augroup END If you use terminal vim, change cursor colors in terminal settings.


2

That is not easily possible. I think those colors mentioned there are predefined in the source. Most other colors will be read from the distributed file RGB.txt in the runtime directory. This file come originally from the X11 source and determines the color definitions for various names. (See also here) It is not advisable, to change those definitions in ...


2

I assume by "column" you mean in a tab-delimited sense. You can get this effect with the following code. Turn on and off with :DoColorColumns/:NoColorColumns. You can easily make a mapping if desired. All this is doing is using matchadd( with a regular expression that skips the appropriate number of text+tab blocks. function! ColorColumns(state) let l:...


2

By default, the vim-signature plugin uses the SignatureMarkText highlighting group for its mark signs. It's better to set the colour of this in your vimrc rather than editing the plugin's code (which could cause problems if/when you want to update the plugin). Add the following line to your vimrc file: highlight SignatureMarkText guifg=White ctermfg=White ...


2

Mark column is added by plugin: vim-signature. Need to edit: $HOME/.vim/bundle/vim-signature/autoload/signature/utils.vim Change 'SignatureMarkText' color. Need to exit vim to see the change.


2

Assuming by text line OP means the command line window (e.g., via echom), use :echohl to set the colors and :echom to print strings. Note that echohl uses the available highlight groups; you may want to use execute and highlightto create your own from function arguments if custom highlights are needed. Otherwise, just lean on the provided groups and trust ...


2

This specific difference is caused by the background setting. It is because on a dark background, light font colors look better and vice versa. You can set it with the set background=dark in your vimrc. The actual colorization rules use a relatively complex regexp-based ruleset, defined in syntax/ directory (on most Linuxes, it is in /usr/share/vim/vim<...


2

Note: Written before OP added the relatively important detail that the signs are generated by Syntastic. Ergo, a general tossing of things against the wall to see what sticks rather than a quick honing in on the actual solution à la the subsequent, accepted answer. It's fine, though. :P It seems you are at least partially aware of how this works but let's ...


2

What works for me, in your .vimrc first set your colorscheme, then your desired highlight: colorscheme gruvbox highlight Cursorline whatever_you_like That way your colorscheme won't clobber your highlight.


2

You should also include: highlight ErrorMsg cterm=NONE The cterm attributes often interact with the color settings and can end up having Vim picking a "bright" shade of the color. The "koehler" theme ships with cterm=bold, which has this effect of using a bright color on many terminals, including iTerm2 (with default settings.) You can inspect your ...


2

This is certainly possible, but it requires a bit of VimScript. The following function does the basic thing: func SwapHiGroup(group) let id = synIDtrans(hlID(a:group)) for mode in ['cterm', 'gui'] for g in ['fg', 'bg'] exe 'let '. mode.g. "= synIDattr(id, '". \ g."#', '". mode. "')" exe "let "....


2

It is a bit surprising: my first guess was that one of ErrorMsg, Question, or WarningMsg would work. Turns out the highlight group you are looking for is MoreMsg, e.g.: :highlight MoreMsg guifg=red


2

This is expected. Vim implements a terminal emulator for :terminal (since it needs to keep it inside its window) and it implements one that's compatible with "xterm" (since it needs to pick a specific terminal to implement and "xterm" is a very popular one.) You can still enable 256-color support by setting TERM=xterm-256color in your Vim terminal. See :...


2

Vim (and neovim) use some highlighting groups (:h highlight-groups) to define which color a UI component should have. For the cursor line the group is hl-CursorLine (:h hl-CursorLine). Such groups can only contain one color and the code is not made to support the kind of customization you are looking for. So the answer is: it is not possible to recreate ...


2

Consider using the synIDattr() function, which can take special attributes such as fg# and bg# to return RGB for attributes, when a GUI is running. "fg#" like "fg", but for the GUI and the GUI is running the name in "#RRGGBB" form "bg#" like "fg#" for "bg" "sp#" like "fg#" for "sp" The first argument to this function is a numeric {synID}, if ...


2

The highlight of the matching brace is ruled by the MatchParen group. You can customize it with the highlight command. Here's an example: highlight MatchParen guifg=Black guibg=Yellow


Only top voted, non community-wiki answers of a minimum length are eligible