VI and VIM Syntax Highlighting on Fedora / CentOS / Red Hat (RHEL) - Comment Page: 2

This is guide, howto enable Vi and Vim text editor syntax Highlighting on Fedora / CentOS / Red Hat (RHEL). Actually on Fedora, CentOS and Red Hat (RHEL) does only have Vim (Vi IMproved), but if you run vi command it works, because it runs small/minimal version of Vim, which is like original Vi. I have seen too many guides howto enable Vi/Vim syntax highlighting, which says that you can turn syntax highlighting on/off with using :syntax on and :syntax off. It's almost true, but actually on Fedora, CentOS and RHEL you can't turn Vi syntax highlighting on with any command, because Vi (Vim minimal) does not have syntax highlighting feature included. If you run following command: vi...

26 comments on “VI and VIM Syntax Highlighting on Fedora / CentOS / Red Hat (RHEL) - Comment Page: 2

1 2
    1. That’s it :) Many thanks! That’s made me happy :)

      Reply
      • You can force vim to act as vim by setting

        set nocompatible

        in $HOME/.vimrc

        Reply
    2. very helpful, finally I got the syntax on worked, thank you a lot !!(centOS 7 server without GUI)

      Reply
1 2

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close