2

I just got a mac and have been trying to setup Vim 8 on the built-in terminal. I am mostly having some difficulties with colors.

1) After set number, how do I change the line number colors? I tried

highlight LineNr term=bold cterm=NONE ctermfg=DarkGrey ctermbg=NONE gui=NONE guifg=DarkGrey guibg=NONE

which works for me on Linux but it doesn't work on Mac.

2) Is there a way to change the colorscheme? It seems I can't edit the files in /usr/share/vim/vim80/colors or add another file.

3) Is there a way to make the syntax highlighting richer? I added the following which doesn't seem to have any effect:

try
    " Java: 'new', 'instanceof'
    autocmd FileType java highlight Operator ctermfg=5  guifg=#d175bc
    " Java: 'this', 'super'
    autocmd FileType java highlight Typedef ctermfg=5  guifg=#d175bc
    " Java: 'void', 'int', 'double'
    autocmd FileType java highlight Type ctermfg=4  guifg=#69b7d3
catch
endtry

In Linux, those commands would at least make Java's syntax recognition a bit better.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.