how to install vim on linux

how to install vim on linux

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
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
02Loaded plugins: fastestmirror
03Loading 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
08Setting up Install Process
09Package 2:vim-X11-7.0.109-6.el5.i386 already installed and latest version
10Package 2:vim-common-7.0.109-6.el5.i386 already installed and latest version
11Package 2:vim-minimal-7.0.109-6.el5.i386 already installed and latest version
12Resolving Dependencies
13--> Running transaction check
14---> Package vim-enhanced.i386 2:7.0.109-6.el5 set to be updated
15--> Finished Dependency Resolution
16 
17Dependencies Resolved
18 
19===========================================================================================================================================================================================================
20 Package                                             Arch                                        Version                                                 Repository                                   Size
21===========================================================================================================================================================================================================
22Installing:
23 vim-enhanced                                        i386                                        2:7.0.109-6.el5                                         base                                        1.2 M
24 
25Transaction Summary
26===========================================================================================================================================================================================================
27Install      1 Package(s)
28Update       0 Package(s)
29Remove       0 Package(s)
30 
31Total download size: 1.2 M
32Is this ok [y/N]: y
33Downloading Packages:
34vim-enhanced-7.0.109-6.el5.i386.rpm                                                                                                                                                 | 1.2 MB     00:00
35Running rpm_check_debug
36Running Transaction Test
37Finished Transaction Test
38Transaction Test Succeeded
39Running Transaction
40 Installing     : vim-enhanced                                                                                                                                                                        1/1
41 
42Installed:
43 vim-enhanced.i386 2:7.0.109-6.el5
44 
45Complete!

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

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.