gibney.org
:
Technology
:
Vim
:
Syntax Hightlighting
(Entry Nr. 353, by user 1 |
edit
)
Enable Syntax hightlighting in vim: <br> <br>:syntax on <br> <br>If that doesnt work, you dont have enought vim. Get full vim: <br> <br><span class=span_content_bash>apt-get install vim-full</span> <br> <br>By default vim only supports 16 colors. To enable 256 colors, use this: <br> <br>:set t_Co=256 <br> <br>If you want to see, how the 256 colors look like, you can use this command in the bash: <br> <br><span class=span_content_bash>perl -e 'print "\e[38;5;${_}m$_ " for (0 .. 255)'</span> <br> <br>You can change colors like this: <br> <br>:hi Comment ctermfg=245 <br> <br>Find out, which group the word under they cursor belongs to: <br> <br>:echo synIDattr(synID(line("."), col("."), 1), "name")
Create a new entry at this position