0

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)

1
  • $ echo $TERM and show us your ~/.vimrc.
    – romainl
    Jun 12, 2012 at 14:41

1 Answer 1

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .