Q. I am using vim under Ubuntu Linux and whenever I type following command:
syntax on
I’m getting an error which read as follows:
E319: Sorry, the command is not available in this version: syntax on
How do I fix this problem?
A. Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs.
There are a lot of enhancements above Vi: multi level undo, multi windows and buffers, syntax highlighting, command line editing, filename completion, on-line help, visual selection, etc
Ubuntu Linux comes with tiny version of vim.
All you need to do is installed full vim version by typing following command:
$ sudo apt-get install vim
You can add syntax on command to ~/.vimrc file
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
- RSS feed or Weekly email newsletter
- Share on Twitter • Facebook • 40 comments... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Did you even read the question? The answer doesn’t address the question at all.
Actually answers the question.
Ubuntu natively comes with tiny vim. This does not support syntax and other fancy stuff. So if you’ve just installed Ubuntu and run vim, you will get the error reported.
In order to get syntax highlighting and other features, you must install the complete vim via apt-get.
Installing the full vim via apt-get doesn’t help at all. The problem stays as it is.
Installing vim via apt-get solved the problem. Thank you.
Great post, solved my problem, thanks!
Works perfectly – who would have thought – two vim packages.
you should be using vim-tiny that is the default package in Ubuntu.
You should install a more bloated version. :-)
It works. ha ha
Thank you for this post, it worked fine!
solved my problem.
Thank you.
Thank you :-)
I’m running Debian and I came across the same issue. I originally thought I was using some archaic version of vim! This article did the trick.
Works fine. Tk’s
Thank you. I have apt-got vim, and my world is colorful now :)
My Ubuntu 8.10 natively comes with vim-tiny. By installing full vim, now the syntax highlighting works.
The vi command no longer points to /usr/bin/vim.tiny. Instead it now points to /usr/bin/vim.basic
$ readlink -f `which vi`
/usr/bin/vim.basic
$dpkg -S /usr/bin/vim.basic
vim: /usr/bin/vim.basic
Thanks so much Vivek!
Ole! Thanks.
It works, thanks.
Worked for me too. Thanks.
excellent tutorial!
Thanks!
I was getting the same error. Dint know that I was running vim.tiny :D…. Thanx for the post .. Thank you . :)
Thanks for the tip! It solves my problem:)
Thanks a lot..it has solved my problem .Top of it other few errors are also solved …
This is long-winded answer which is why a few people didn’t understand it.
The answer is the default version doesn’t have syntax highlight, so install the full version using:
sudo apt-get install vim
hey this was very useful, before trying your soln i tried
apt-get update vi ….. but no luck
what to say vivek,, u r just too good :)
I had the same problem on Ubuntu 9.10, but this didn’t fix the problem!
I had to remove vim, vim-tiny
sudo apt-get remove vim vim-tiny
And reinstall vim
sudo apt-get install vim
same problem, thx for help!
Thanks for your help. It solved my problem.
It works on debian 6.0
Thanks for the post. It solved my problems…
Thanks:)
Sill works, Ubuntu 12.04
You may also need to run the following command, to use the “non-tiny” vi:
sudo update-alternatives –config vi
great! Your’are my hero.
DOH! DUH! Now my highlighting works. Thanks.
The answer is not proper for people who are facing issues when vim is installed from source. Do you have a solution for people facing this problem after installing vim from source?
Thanks!!! installed the full version of vim, resolved the problem
Works fine, thanks
thanks a lot
Thanks, it works!
apt get solved my problem