Ubuntu Linux Vim Sorry, the command is not available in this version: syntax on

Ubuntu Linux Vim Sorry, the command is not available in this version: syntax on

The syntax on command in Vim is used to enable syntax highlighting, which is a feature that displays different colors for different types of syntax elements in a text file.

If you receive an error message saying "Sorry, the command is not available in this version: syntax on" when you try to use this command in Vim, it means that the syntax highlighting feature is not available in your version of Vim.

There are several possible reasons why the syntax highlighting feature might not be available in your version of Vim. One possible reason is that Vim was compiled without the syntax highlighting feature. Another possible reason is that the syntax highlighting feature was disabled in the configuration file for Vim.

To enable syntax highlighting in Vim, you can try the following steps:

  1. Check if the syntax highlighting feature is available in your version of Vim. You can do this by running the :version command in Vim and looking for the +syntax or -syntax flag. If the +syntax flag is present, it means that the syntax highlighting feature is available in your version of Vim. If the -syntax flag is present, it means that the syntax highlighting feature is not available.

  2. If the syntax highlighting feature is not available in your version of Vim, you can try installing a version of Vim that includes the syntax highlighting feature. You can do this by installing the vim-nox package or a similar package that includes the syntax highlighting feature.

  3. If the syntax highlighting feature is available in your version of Vim, but it is not enabled, you can try enabling it by adding the following line to your Vim configuration file (~/.vimrc):

syntax on
Source:ww‮ual.w‬tturi.com

This will enable syntax highlighting when you start Vim.

You can find more information about using Vim and its features in the Vim documentation or by searching online.

Created Time:2017-10-30 14:27:26  Author:lautturi