I have recently got a copy of Ubuntu 12.04.2(LTS), but unfortunately problem occurs while trying VI editor. I have heard that VIM (VI improved) should be installed in order to use vi in this version. If this is the case then is there any way to install it OFFLINE? Is there any alternate editor that can be used to write shell scripts or C source programs.
3 Answers
The package for the terminal version of Vim is named vim
. You can download it and its dependencies here. You need to at least also install the vim-common
and vim-runtime
packages.
There's also a GUI version of Vim, the package name is vim-gnome
.
-
thnks, I also want to know whether it can be done just offline,I mean downloading first,because the machine where ubuntu is installed has no internet connection @Ingo Karkat– rosemarySep 25, 2013 at 14:10
-
The download links are at the bottom of the linked page; you can choose between 32-/64-bit versions. The will get you a
*.deb
file which you can then install withdpkg -i *.deb
. Sep 25, 2013 at 14:16
I think the vi
come with Ubuntu12.04 is vim tiny
or something like that which is not fully featured one. You can install it offline, get a deb
package for vim and copy it to your machine, use dpkg -i your_deb_package
.
-
thnxx @john smith , I have to try it,where do I get a deb package? You are right,but some of the modes in the editor doesn't work properly..– rosemarySep 25, 2013 at 13:58
-
you may found it here. look for vim gnome. launchpad.net/ubuntu/+source/vim– John SmithSep 25, 2013 at 13:59
The vi
command is available by default on every UNIX-y operating system, including Ubuntu 12.04 LTS.
On Debian-based systems like Ubuntu, vi
is not the original vi
but a lightweight Vim build that usually lacks a few useful features like clipboard or scripting support.
You are not very clear about the "problem" that "occurs". Without more information, we can't do much more than provide generic advices.
If you are really unable to install/update your programs your only solution is to customize your Vim config as well as you could. Run the following command in a terminal emulator:
$ touch ~/.vimrc
You should now be able to use the
vim
command with saner defaults. After that, you are on your own for the rest of the learning curve.If you are able to update/install programs, use the Synaptic package manager or
apt-get
to install thevim-gnome
orvim-gtk
package which are much more complete than the default build.Once the installation is complete, create a
~/.vimrc
like above and enjoy the ride.
-
I mean to say commands pertaining to the modes like :i, :x aren't working properly.For example,in input mode I can't use backspace to delete some characters, the keys behave abnormally. @romainl– rosemarySep 25, 2013 at 14:19
-
Not all version of Ubuntu includes
vim
/vi
. The user has to install it normally in 13.04.– BraiamSep 25, 2013 at 15:25 -
@rosemary. The backspace behaviour is default vi behavior. You must do quite a lot of configuration if you want it to behave "normally". Your vim works perfectly: no need to reinstall it!– romainlSep 25, 2013 at 16:03
vi
command that ships with Ubuntu is the tiny version of Vim. What "problem" do you have with it?vimtutor
to get an introduction. Or try a more straightforward editor likenano
.