新安装 Ubuntu,vi 出现很多抱歉,该命令不可用

新安装 Ubuntu,vi 出现很多抱歉,该命令不可用

我已经复制了我的点文件,但是当我使用 vi 时我得到了这个:

$ vi app/controllers/application_controller.rb
Error detected while processing /home/durrantm/.vimrc:
line   24:
E319: Sorry, the command is not available in this version: autocmd BufWritePre *.rb :%s/\s\+$//e
line   33:
E319: Sorry, the command is not available in this version: syntax on " Turn on syntax highlighting
line   34:
E319: Sorry, the command is not available in this version: autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
line   35:
E319: Sorry, the command is not available in this version: autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
line   36:
E319: Sorry, the command is not available in this version: autocmd InsertLeave * match ExtraWhitespace /\s\+$/
line   37:
E319: Sorry, the command is not available in this version: autocmd BufWinLeave * call clearmatches()
line   39:
E518: Unknown option: foldmethod=indent
line   40:
E518: Unknown option: foldnestmax=10
line   41:
E518: Unknown option: nofoldenable
line   42:
E518: Unknown option: foldlevel=1
line   43:
E319: Sorry, the command is not available in this version: let mapleader = ","
line   44:
E319: Sorry, the command is not available in this version: let loaded_matchparen = 1 " MDD Turn off matching bracket highlighting.
line   45:
E319: Sorry, the command is not available in this version: filetype plugin indent on
line   46:
E319: Sorry, the command is not available in this version: filetype indent on
line   47:
E319: Sorry, the command is not available in this version: filetype plugin on
Press ENTER or type command to continue

答案1

失败的原因是我没有安装vim,所以

sudo apt-get install vim

修复了这个问题

相关内容