在Ubuntu 14.04中安装Vim


25

我无法安装Vim,需要帮助。我尝试了以下方法:

root@cbitlab1:/home/cbitlib1# sudo -s
root@cbitlab1:/home/cbitlib1# apt-get install vim
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘vim’ has no installation candidate

我该如何解决-我在14.04。

Answers:


36

为了确保您拥有最新的sources.list

sudo apt-get update

然后运行:

sudo apt-get install vim

11

Vim已预先安装在基于Linux的操作系统中。对于Ubuntu,其最低版本已预安装。

vim.tiny

您可以创建别名以将其作为vim运行

alias vim=vim.tiny

为了使该别名成为永久别名,

gedit ~/.bashrc

alias vim=vim.tiny.bashrc文件中添加行。

有关更多信息,请参见此处:如何创建永久的Bash别名?

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.