Hot answers tagged

7

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 ...


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

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

I'm not sure what you mean by "profile settings", but I'm assuming you mean terminal profiles, which don't affect vim (much). Try opening your .vimrc. It should be in your home directory, named that. Inside the .vimrc, you can set different settings to load every time you open vim, such as colorschemes. If you want to always use the default one, just add ...


3

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 ...


3

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 ...


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 ...


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

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

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

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 "....


1

The help for the function term_setansicolors provides some more details. The short story is these 16 colors form a conventional palette which terminal programs use when outputting text. You can set them to anything you want, but it's best to stick to the vague color descriptions below. term_setansicolors({buf}, {colors}) *term_setansicolors()* ...


1

I don't know about any plugins for this but it should be easy to code up lookup tables for the other codes. The decimal numbers, like 208 in your example, are 256-color palette codes. It's easy to find translations to/from hex code. Like the top of the google search for 256 color to hex. The spelled-out colors (e.g. DarkSeaGreen4) are system dependent. You ...


1

Hightlight first and last 2 lines after column 80: :autocmd VimEnter,WinEnter * :match Error /\v%>80v%<3l.*|%>80v.*%$|%>80v.*(\n.*%$)@=/ You need to open a new window or reopen vim for this to work. Explanation: %>80v%<3l.* match everything after column 80 in first 2 lines %>80v.*%$ match everything after column 80 in last line %&...


1

It is very common for a fancy colorscheme (such as solarized, base16-*, you name it) to require palette changes in a terminal. Without it you will face ugly colors. I generally avoid such colorschemes in terminals and use them only in GUI vim. To solve it -- goto the place you have obtained colorscheme, find description on how to properly use it. Usually ...


1

From the docs (:help syntastic-error-signs): Signs are colored using the Error and Todo syntax highlight groups by default (see |group-name|). If you wish to customize the colors for the signs, you can use the following groups:     SyntasticErrorSign - For syntax errors, links to "error" by default     SyntasticWarningSign - For syntax warnings, links to "...


1

It seems you are at least partially aware of how this works but let's lay it out formally... When you define the sign you specify the highlighting group to be used when that sign is displayed. (Run :hi to see all of your currently defined groups.) For example, a sign that will have the same background color (and foreground color!) as one's 'colorcolumn' ...


1

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 ...


1

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.


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