Running a minimal ISO of CentOS_7

I've tried writing a .sh script using vi but can't get syntax highlighting to work.

Pressing escape and typing :syntax on as shown in articles like this one are not working.

The files I'm creating and editing are definitely .sh files and all have #!/bin/bash at the start of the first line.

What am I missing?


I think that your problem is your vim version: probably doesn't include syntax highlighting; try this:

yum install vim-enhanced

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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