ubuntu下,配置了.vimrc文件,然后用vi命令編輯文件,打開的時候提示
Sorry, the command is not available in this version: syntax on
錯誤所在行的內容是syntax on
,這是為什么呢?
閉關修行中......
The vim that comes with Ubuntu is a streamlined version, and of course there is no syntax configuration.
You only need to install a full version of vim
$ sudo apt-get install vim
Only vim has syntax support. When the vi command calls vim, it will run in vi compatibility mode. I googled vi and vim and gave you the first article http://www.songzi.org/blog/article.as...
@holee mentioned in the comments that vi under ubuntu is vim. Since I am an Arch user and do not use ubuntu, I am not sure.
In short, use vim to call the editor, and make sure ~/.vimrc also has set nocompatible
to ensure it is not running in vi compatibility mode.