no colour in vim in a Docker container when using contour #1240
-
I edit files in running containers using Vim, primarily for prototyping a Dockerfile. I recently installed contour, and it's fantastic. However, when I edit files in my container with Vim, the colors are missing. I suspect I may have overlooked something in the configurations (either Docker or contour). When I execute the following commands: docker run -it debian:stable-slim bash
>> apt update && apt install -y vim
>> vim I don't see any colors when editing a file, for instance, Moreover, I've noticed that executing any command in the bash within the container works fine. For example: # In container
>> ls --color
>> echo -e "\e[31mRed Text\e[0m" I've added this post to the discussion as I don't believe the issue is related to Contour. I suspect my lack of understanding regarding terminal emulators and Docker is the cause. If you can identify or replicate this behavior and investigate why it doesn't work, I would be greatly appreciative 😁 . I wonder why the container's bash seems to handle colors well, while Vim within the container fails to output colors. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@mufasachan |
Beta Was this translation helpful? Give feedback.
@mufasachan
The reason for this is mismatch between
TERM
variables and some specific handling of docker of this things, i can reproduce this behaviour that vim does not want to show colors while bash works fine. I will turn this into an issue #1244Some info from docker side : docker/cli#2938