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
If your OS does not have vim then use following command.
[root@siwan]# yum install vim-X11 vim-common vim-enhanced vim-minimal Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * addons: hpc.arc.georgetown.edu * base: mirrors.netdna.com * extras: mirrors.greenmountainaccess.net * updates: mirror.cogentco.com Setting up Install Process Package 2:vim-X11-7.0.109-6.el5.i386 already installed and latest version Package 2:vim-common-7.0.109-6.el5.i386 already installed and latest version Package 2:vim-minimal-7.0.109-6.el5.i386 already installed and latest version Resolving Dependencies --> Running transaction check ---> Package vim-enhanced.i386 2:7.0.109-6.el5 set to be updated --> Finished Dependency Resolution Dependencies Resolved =========================================================================================================================================================================================================== Package Arch Version Repository Size =========================================================================================================================================================================================================== Installing: vim-enhanced i386 2:7.0.109-6.el5 base 1.2 M Transaction Summary =========================================================================================================================================================================================================== Install 1 Package(s) Update 0 Package(s) Remove 0 Package(s) Total download size: 1.2 M Is this ok [y/N]: y Downloading Packages: vim-enhanced-7.0.109-6.el5.i386.rpm | 1.2 MB 00:00 Running rpm_check_debug Running Transaction Test Finished Transaction Test Transaction Test Succeeded Running Transaction Installing : vim-enhanced 1/1 Installed: vim-enhanced.i386 2:7.0.109-6.el5 Complete!
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