Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6571029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:49:49+00:00 2026-05-25T14:49:49+00:00

I recently found this little piece of code for my .vimrc if has(autocmd) Highlight

  • 0

I recently found this little piece of code for my .vimrc

if has("autocmd")
  " Highlight TODO, FIXME, NOTE, etc.
  if v:version > 701
    autocmd Syntax * call matchadd('Todo',  '\W\zs\(TODO\|FIXME\|CHANGED\|XXX\|BUG\|HACK\)')
    autocmd Syntax * call matchadd('Debug', '\W\zs\(NOTE\|INFO\|IDEA\)')
  endif
endif

Basically, it allows me to define keywords which are matched with different highlighting (Todo and Debug are the names of the colors).

Is there a way that I can define my own coloring schemes and give them names? Specifically what I want to have is 3 tags: TODO1, TODO2 and TODO3. The idea is that TODO3 is lower priority than TODO1 and thus is highlighted in a lighter shade.

If I can’t define my own coloring, where can I find a list of the color names I can use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:49:49+00:00Added an answer on May 25, 2026 at 2:49 pm

    If you don’t want to use default theme colors, here is the solution:

    " Define autocmd for some highlighting *before* the colorscheme is loaded
    augroup VimrcColors
    au!
      autocmd ColorScheme * highlight ExtraWhitespace ctermbg=darkgreen guibg=#444444
      autocmd ColorScheme * highlight Tab             ctermbg=darkblue  guibg=darkblue
    augroup END
    

    And later on (this must be after):

    " Load color scheme
    colorscheme yourscheme
    

    Color definitions follow the format:

    autocmd ColorScheme * highlight <ColorName> ctermbg=<TerminalBackgroundColour> guibg=<GuiBackgroundColour> ctermfg=<TerminalFontColor> guifg=<GuiFontColour>
    

    Where the cterm colors must come from a predefined list (see :help cterm-colors for more info). Gui colors can be any Hex color.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently found this post . It basically says that Eclipse has a modified
I just recently found myself writing this line of code, which i did not
I recently found myself writing a piece of code that executed a Core Data
So, I recently found this little gem. http://support.microsoft.com/kb/323308 Essentially, IE doesn't haven't Cache-Control: no-cache
I've recently added this little bit of code to my .htaccess file: RewriteCond %{REQUEST_FILENAME}
I found this little gem in our codebase at work recently. I have to
I've recently found this blog entry on a tool that writes XSS attacks directly
So, i recently found this term related somehow to neural networks, but I don't
I found this typo recently: if (name.find('/' != string::npos)) Obviously the dev meant to
I recently found an article online that told me about this: RewriteRule ^mock-up/([^/]+)/([^/]+) /mock-up/index.php?page=$1&section=$2

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.