If you are using linux so you are very much familiar with vim editor. Here I will show how install vim editor on linux box using command line.
Some time when you are doing new setup of server like for linux distribution. There is lot is coming cloud hosting and centos and fedora. My most favorite is fedora.
install vim on linux
how to install vim on linux
If your OS does not have vim then use following command.
01
[root@siwan]# yum install vim-X11 vim-common vim-enhanced vim-minimal
02
Loaded plugins: fastestmirror
03
Loading mirror speeds from cached hostfile
04
* addons: hpc.arc.georgetown.edu
05
* base: mirrors.netdna.com
06
* extras: mirrors.greenmountainaccess.net
07
* updates: mirror.cogentco.com
08
Setting up Install Process
09
Package 2:vim-X11-7.0.109-6.el5.i386 already installed and latest version
10
Package 2:vim-common-7.0.109-6.el5.i386 already installed and latest version
11
Package 2:vim-minimal-7.0.109-6.el5.i386 already installed and latest version
13
--> Running transaction check
14
---> Package vim-enhanced.i386 2:7.0.109-6.el5 set to be updated
15
--> Finished Dependency Resolution
19
===========================================================================================================================================================================================================
20
Package Arch Version Repository Size
21
===========================================================================================================================================================================================================
23
vim-enhanced i386 2:7.0.109-6.el5 base 1.2 M
26
===========================================================================================================================================================================================================
31
Total download size: 1.2 M
34
vim-enhanced-7.0.109-6.el5.i386.rpm | 1.2 MB 00:00
35
Running rpm_check_debug
36
Running Transaction Test
37
Finished Transaction Test
38
Transaction Test Succeeded
40
Installing : vim-enhanced 1/1
43
vim-enhanced.i386 2:7.0.109-6.el5
Following are the common commands for doing editing with vim editor.
#vim somefile
some keys
i – for insert the text
escape – going to back
:18 – for going to line no 18
:w – write and save the file
:q! – quit the file, without saving
:wq! – saving and closing the file
shift +g – going to bottom of file
page up – page up
page down – page down