I created a Docker container based on an Opensuse 42.3 image. I'm having an issue with vim not performing any syntax highlighting in my Opensuse 42.3 container. I'm running my Docker image on an Opensuse 42.3 host. If I open a bash file from within the container and use :syntax on
, nothing happens. I am using the -it flag when calling docker run
, and I can see colors on the files/folders when I use ls
. Sourcing a .vimrc file doesn't seem to do anything as well. My XTERM environment variable is set to 'xterm', and the file that I am looking at with vim is a bash shell script file.
I have mounted my linux home directory to the home directory on the container. What are some ways to verify or run tests to see where the source of the issue may be?
I used the :hi
command with vi open, and the output was colorful. According to Ingo Karkat that meant that there were no syntax definitions/filetype detections installed in the container. I used zypper install -y vim-data
, and vi started to highlight syntax in files.