Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have problem with VIM command line when calling system commands. e.g. !ls, all command output colors aren't parsed by VIM. My system is Ubuntu 12.04 LTS with VIM 7.3.429 from Ubuntu repositories.

Is there any workaround for this problem?


EDIT:

My vimrc file

:!echo $TERM in VIM returns : dumb


EDIT2:

I found a simple workaround but it's not perfect

if [ "$VIM" ] && [ "$TERM" = "dumb" ] 
then 
    # For gvim's monochromatic :shell 
    PS1='\n\u@\h \w\n\$ ' 
    unalias ls 
    unalias grep 
fi 

(It's working on bash)

share|improve this question
    
$ echo $TERM and show us your ~/.vimrc. –  romainl Jun 12 '12 at 14:41

1 Answer 1

2 Steps:

1) set TERM to something other than "dumb" in .bashrc. xterm should be fine, as it looks like you're on Ubuntu.

2) In .vimrc, add set t_Co=256. That tells vim you're on a 256 color terminal.

That should fix your problems.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.