I’ve gotten used to Vim over time so I’d like to install it on my RPi A+ running Rasbian. So far I’ve set up WiFi and I’m able to SSH to it. Now I can just power it up and leave it somewhere safe while I SSH into from my phone or computer.
Vim stands for Vi IMproved, which is a modified version of Vi. It’s a minimalistic text editor that has a bit of a learning curve. However once you get the basics, it seems less intimidating.
I’m going to use APT (Advanced Packaging Tool) to get Vim, so to start off with a fresh list of the packages :
sudo apt-get update |
I get the following as the RPi gets updates from the rasbian servers :
Get:1 http://raspberrypi.collabora.com wheezy Release.gpg [836 B] Get:2 http://mirrordirector.raspbian.org wheezy Release.gpg [490 B] Get:3 http://raspberrypi.collabora.com wheezy Release [7,514 B] Get:4 http://mirrordirector.raspbian.org wheezy Release [14.4 kB] Get:5 http://archive.raspberrypi.org wheezy Release.gpg [490 B] Get:6 http://mirrordirector.raspbian.org wheezy/main armhf Packages [6,897 kB] Get:7 http://raspberrypi.collabora.com wheezy/rpi armhf Packages [2,214 B] Get:8 http://archive.raspberrypi.org wheezy Release [10.2 kB] Get:9 http://archive.raspberrypi.org wheezy/main armhf Packages [108 kB] Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en_GB Ign http://raspberrypi.collabora.com wheezy/rpi Translation-en Ign http://archive.raspberrypi.org wheezy/main Translation-en_GB Ign http://archive.raspberrypi.org wheezy/main Translation-en Hit http://mirrordirector.raspbian.org wheezy/contrib armhf Packages Hit http://mirrordirector.raspbian.org wheezy/non-free armhf Packages Hit http://mirrordirector.raspbian.org wheezy/rpi armhf Packages Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en_GB Ign http://mirrordirector.raspbian.org wheezy/contrib Translation-en Ign http://mirrordirector.raspbian.org wheezy/main Translation-en_GB Ign http://mirrordirector.raspbian.org wheezy/main Translation-en Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en_GB Ign http://mirrordirector.raspbian.org wheezy/non-free Translation-en Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en_GB Ign http://mirrordirector.raspbian.org wheezy/rpi Translation-en 100% [6 Packages xz 0 B] Fetched 7,041 kB in 57s (122 kB/s) Reading package lists... Done |
You could run a search if you’re not sure about the name :
apt-get search vim |
I’m just interested in VIM and not the other addons or variations. So I’m going to go ahead an install it :
sudo apt-get install vim |
And I get :
Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: vim-runtime Suggested packages: ctags vim-doc vim-scripts The following NEW packages will be installed: vim vim-runtime 0 upgraded, 2 newly installed, 0 to remove and 23 not upgraded. Need to get 5,281 kB of archives. After this operation, 24.5 MB of additional disk space will be used. Do you want to continue [Y/n]? |
I hit “Y” on the prompt and it starts the install :
Do you want to continue [Y/n]? Y Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main vim-runtime all 2:7.3.547-7 [4,607 kB] Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main vim armhf 2:7.3.547-7 [674 kB] Fetched 5,281 kB in 20s (257 kB/s) Selecting previously unselected package vim-runtime. (Reading database ... 76938 files and directories currently installed.) Unpacking vim-runtime (from .../vim-runtime_2%3a7.3.547-7_all.deb) ... Adding 'diversion of /usr/share/vim/vim73/doc/help.txt to /usr/share/vim/vim73/doc/help.txt.vim-tiny by vim-runtime' Adding 'diversion of /usr/share/vim/vim73/doc/tags to /usr/share/vim/vim73/doc/tags.vim-tiny by vim-runtime' Selecting previously unselected package vim. Unpacking vim (from .../vim_2%3a7.3.547-7_armhf.deb) ... Processing triggers for man-db ... Setting up vim-runtime (2:7.3.547-7) ... Processing /usr/share/vim/addons/doc Setting up vim (2:7.3.547-7) ... update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode |
All done, now to test it out by just running it by simply typing
vim |