Error "E492: Not an editor command: skip_defaults_vim=1" in .vimrc after vim-enhanced installation on RHEL

Solution Verified - Updated -

Issue

  • When editing files with vi on RHEL systems, the following error may appear after installing the full vim-enhanced package:

    # vi test
    Error detected while processing /root/.vimrc:
    line    1:
    E492: Not an editor command: skip_defaults_vim=1
    Press ENTER or type command to continue
    
  • This can also occur if the line contains #, such as:

    # vi test
    Error detected while processing /root/.vimrc:
    line    2:
    E488: Trailing characters: skip_defaults_vim=1: #skip_defaults_vim=1
    Press ENTER or type command to continue
    

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 9
  • Red Hat Enterprise Linux 10
  • vim-enhanced package installed

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content