Output color in cscope output in vim?

I am using vim7.4. The cscope output in vim is all white. Is it possible to make it more colorful?

I tried cecscope which uses quickfix to give vim color. But his exit is not friendly to the small screen. This is not so useful when using a laptop.

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

Thanks.

+8
vim cscope
source share
5 answers

The default editor for Cscope is vi not VIM. Vi does not have syntax highlighting and other plugin functions, etc. Just change the default editor to vim. All Vim settings will be output to Cscope.

$ export CSCOPE_EDITOR = vim

Done.

+5
source share

Use this in .vimrc -

enable syntax

- but not

syntax

It worked for me.

+1
source share

You can set the color in the cscope editor by changing its default editor to vim from vi. You just need to add the CSCOPE_EDITOR environment CSCOPE_EDITOR as /usr/bin/vim (get your absolute path for vim using the which vim command). Add the line below to your .cshrc file in your home folder to save it (I tried in REDHAT).

 setenv CSCOPE_EDITOR /usr/bin/vim 
0
source share

Exporting CSCOPE_EDITOR to ~ / .bashrc worked for me.

export CSCOPE_EDITOR = / usr / bin / vim

Thanks Anirud. 'which vim' will determine which vim executable is used.

0
source share

For me, all the above suggestions did not help. I was looking for something like this:

CScope Object Search Result

I achieved this by gluing together several vim commands:

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

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

0
source share

All Articles