Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bring color to cscope output in vim?

Tags:

vim

cscope

I am using vim7.4. cscope output in vim is all white. can it be made more colorful?

I tried cecscope, which uses quickfix to bring color to vim. But the output of it is not small-screen friendly. it is not that useful when using a laptop.

so is there some other way to add color to cscope output? I like the ctags output in vim, or can cscope have the same style?

Thanks.

like image 762
Alex Avatar asked Feb 11 '14 02:02

Alex


2 Answers

The default editor for Cscope is vi not VIM. Vi has no option for Syntax highlighting and other features of plugins etc. Just change the default editor to vim. All your Vim settings will come to Cscope output.

$ export CSCOPE_EDITOR=vim

Done.

like image 161
Anirudh Avatar answered Sep 18 '22 10:09

Anirudh


For me, all the above suggestions didn't work.
What I was searching for is something like this:

CScope highlight search result

I achieved it by gluing up several vim commands:

nnoremap * 
    \ :exec("cs find s ".expand("<cword>"))<CR> 
    \ :copen<CR> 

* - highlight word under cursor
:exec("cs find s ".expand("<cword>"))<CR> - cscope find word under cursor
:copen - open cscope search results window

like image 27
PreslavMihaylov Avatar answered Sep 21 '22 10:09

PreslavMihaylov