Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting the vim color theme for highlighted braces

Tags:

python

vim

How do you change the vim color scheme for highlighted braces? I'm looking to actually edit the .vim theme file to make the change permanent.

Regards, Craig

like image 354
Craig Avatar asked Apr 25 '10 17:04

Craig


People also ask

How do I enable syntax highlights in vim?

After opening login.sh file in vim editor, press ESC key and type ':syntax on' to enable syntax highlighting. The file will look like the following image if syntax highlighting is on. Press ESC key and type, “syntax off” to disable syntax highlighting.

Does vim have syntax highlighting?

VIM is an alternative and advanced version of VI editor that enables Syntax highlighting feature in VI. Syntax highlighting means it can show some parts of text in another fonts and colors. VIM doesn't show whole file but have some limitations in highlighting particular keywords or text matching a pattern in a file.


2 Answers

The automatic highlight colour for matching brackets is called MatchParen. You can change the colour in your .vimrc by doing eg:

highlight MatchParen cterm=bold ctermfg=cyan
like image 151
Daniel Roseman Avatar answered Sep 18 '22 14:09

Daniel Roseman


After reading the FAQ, I can answer my own question. :)

24.9. Is there a built-in function to syntax-highlight the corresponding matching bracket?

No. Vim doesn't support syntax-highlighting matching brackets. You can try using the plugin developed by Charles Campbell:

http://vim.sourceforge.net/tips/tip.php?tip_id=177

You can jump to a matching bracket using the '%' key. You can set the 'showmatch' option to temporarily jump to a matching bracket when in insert mode.

like image 34
Craig Avatar answered Sep 21 '22 14:09

Craig