Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


My vimrc file

:!echo $TERM in VIM returns : dumb


I found a simple workaround but it's not perfect

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

(It's working on bash)

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

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


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.