0

in my init.vim (.vimrc) file i have this:

hi TerminalGreenColor guifg=#6bd676

function! EchoInitVimReloadedSuccessfully()
    echon " -- [ "
    echohl Identifier
    echon "init.vim"
    echohl None
    echon " ] reloaded "
    echohl TerminalGreenColor
    echon "successfully"
    echohl None
    echon " -- "
endfunction


" reload vim with init.vim
nnoremap <C-R> :source $init_vim_path<CR> :call EchoInitVimReloadedSuccessfully()<CR>

when i press CTRL + R it reloads the init.vim file successfully and echoes in the vim command-line row that it worked.

proof that is working:

proof

but my problem is that the word successfully its not colored with TerminalGreenColor(#6bd676)...

any ideas? thanks in advance.

8
  • 1
    I copy pasted your code and it works for me with NVIM v0.5.0 and alacritty 0.8.0. Have you tried another terminal emulator?
    – statox
    Jun 8 at 12:40
  • in the first place i used xfce-terminal (didnt work) and right now i tried in alacritty and it didnt work.
    – alexzander
    Jun 8 at 13:24
  • Hm... Looks like it will be hard to help you debug that then... What does :verbose highlight TerminalGreenColor say? And what happen if you run manually :echohl TerminalGreenColor then :echo 'hello'? Also have you tried changing the properties of TerminalGreenColor to have an idea if the issue comes from the highlighting group itself or from somewhere else?
    – statox
    Jun 8 at 14:08
  • :verbose highlight TerminalGreenColor -> TerminalGreenColor xxx cleared
    – alexzander
    Jun 8 at 14:18
  • 1
    my guess is, that sourcing your init.vim file clears up the highlighting. Perhaps because of a :colorscheme command or :syntax command Jun 8 at 14:46

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.