• Home
  • Archive
  • Tools
  • Contact Us
  • Forum

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
The Customize Windows > Computer and Internet > General > How to Use vi Text Editor

By Abhishek Ghosh January 24, 2015 4:19 am Updated on January 24, 2015

How to Use vi Text Editor

Advertisement

Here is an Easy Guide to How to Use vi Text Editor. Nano is easy, fast to learn and good text editor, but ultimately you will need to learn vi. Yes, you can do Syntax Highlighting in Nano. But, practically that is the kind of end of Nano’s usage. Nano is not written for powerful text editing. This How to Use vi Text Editor guide will not make you a vi expert, but you can; at least use if Nano almost crushes with seg fault.

 

How to Use vi Text Editor : Basic History

 

In short, in POSIX, vi is the only one standard text editor which is actually made to work as default editor at kernel level.

Those who writes History, they neither understand anything, nor thinks how the text can feel to read. You’ll read the descriptions of vi’s History – it will appear, as if the person who wrote vi, is an old, fragile person now and has died. vi is nearly 40 years old but William Nelson Joy aka Bill Joy is actually quite known person and is living quite nicely! He is co-founder of Sun Microsystems.

American companies and some NEW Indian companies has no “owner” thing unlike traditional Indian and European companies, they often get acquired. Only Mr. Mukesh Ambani has personal property more than 20.0 billion USD. It is assumption. Know it clearly – Sir Ratan Tata is the richest person in this World, none can even come closer to him. Thereafter there are many peoples in the line. But none will ever claim.

That is exactly the philosophy of vi. vi does not make fearful with the power it has. We suggest to use Nano to the new SSH users, but; you have to use vi else you’ll become like Larry Page, sell peoples’ personal data – seg fault of Nano.

 

How to Use vi Text Editor

 

wget this webpage :

Vim
1
wget http://www.gnu.org/licenses/gpl-3.0-standalone.html

You can open with vi and on the other new terminal window with nano :

How to Use vi Text Editor

Download / Open the above image by Puppet Labs in full size

Vim
1
2
vi gpl-3.0-standalone.html
nano gpl-3.0-standalone.html

Move the cursor in both window. Not much difference, not really, move the cursor closer to (fsf) – when you are on “(“, the other “)” will get highlighted, indicating the logical end. Press any key – nano will take it, vi will reject. It is done to make sure – you are not unknowingly adding any text. A wrong keypress can add a bug. You need to press i in vi (close that window, there is no need), to enter the insert-text mode. You can escape the insert-text mode only by pressing Escape key, then you need to type :w and press Enter or Return key to save. Adding “!” is forcing, like; if you do not want change it, you need to type :w and press Enter or Return key, but it will prompt you – because you can do mistake of hitting q wrongly, q and w are closer keys. If you want to write out and escape, thats easy – :wq. That “:” and letters we added, are called ex commands. vi derived from ex and ed, two editors.

Advertisement

---

When we are not in the insert-text mode, we are in command mode. We can use – h, j, k, l. It is very easy to remember – just before the [:] key is [L]. in QWERTY keyboard, this is in one line. It takes time to get used with this small usage. Your eyes will get set with the appearance and presence of -- INSERT -- after pressing i. New users get bouncers – they type without pressing i.

on any unix system, if you write :

Vim
1
more gpl-3.0-standalone.html

It is not exactly like the cat utility, it is basically opens in vi. But, when we open it, we run the commands. Why commands? OK. Move the cursor to 3rd line and in command mode, type “:3d” and hit the return key – it will delete the above three lines. Can you do it on Nano? I do not want to know even if Nano has the function after 2 decades of using unix system. I will forget the other things! Anyway, deleting has lot of rules.

If, while editing, the system or file crushed (like your wife suddenly passionately kissed and SSH connection gone away; candy crush Facebook App invitation), you can recover it –

Vim
1
vi -r gpl-3.0-standalone.html

If anyone tell you – To insert a blank line below the current line, type o in lowercase) and to insert a blank line above the current line, type O in uppercase, it means – : is already typed. There is undo too, :u is undo. If you run multiple time, you will get some output like 1 change; before #1 09:05:34.

:x is Quit without change. Search forward is / followed by your thing to search then Return/Enter, search forward is ? . KEEP IN MIND – a also puts in insert mode in OS X. It frequently happens as I type my name somewhere, if the window remained active, that file takes something like – bhishek. I think, we should stop here, it is enough for our reader’s basic need, you can read really good guide here :

Vim
1
http://heather.cs.ucdavis.edu/~matloff/ProgEdit/ProgEdit.html

After learning the basics, you’ll customize your vi :

Vim
1
https://github.com/amix/vimrc

There are lot of macros, lot of things around vi. Definitely, there is help text, you could not read before know these basics – :help

Tagged With autosys text editor vi , how to use vi text editor
Facebook Twitter Google+ Pinterest

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Google Plus - Abhishek Ghosh1 and on Twitter - @AbhishekCTRL.

Follow the Author of this article :

13.7K+ Followers 18.7K+ Followers 2.5K+ Followers 1.5K Followers

Here’s what we’ve got for you which might like :

Articles Related to How to Use vi Text Editor

  • Node.js : Server Side Framework for SaaS

    Node.js is a server side framework for creating server and console applications with JavaScript and suitable for creating Cloud based highly scalable Apps.

  • Mac OS X Original Theme for Ubuntu 12.04 : Will You Like It ?

    Mac OS X Original Theme for Ubuntu 12.04 will make Ubuntu look like Apple Mac OS X simply as the components are ported from Mac. But is it great to steal ?

  • Installing OpenPanel on localhost (Ubuntu PC)

    Installing OpenPanel on localhost or actually your Ubuntu PC can be used for installation and management of various web softwares through a control panel.

  • TTL or Time to Live Explained

    Time to live or TTL is the term of validity of data in a given computer networks that limits the lifespan or lifetime of data, that determines how many intermediate stations (hops) a packet of data is allowed to pass in the Internet.

  • How to SSH to Shared Hosting Server

    Yes, it is possible to SSH to Shared Hosting Server with non-sudoers’ privilege, it never gives the full usage, still better than FTP!

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Google+ or Twitter to join the conversation right now!

If you want to Advertise on our Article or want Business Partnership, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website...

 

 

Popular Articles

All articles of this Website are fully Free to read. Here are some, which possibly you'll like to read! Do not hesitate to contact us for any concern.

Contact Us

Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Recent Posts

  • Approaches of Deep Learning : Part 4 (Conclusion) April 25, 2018
  • Let’s Encrypt Effect : Huge Slash of Price of SSL/TLS DV and EV Certificates April 25, 2018
  • Arduino : IR Obstacle Detection Sensor For Dimming LED (Stop Event Facing Obstacle) April 24, 2018
  • Approaches of Deep Learning : Part 3 April 24, 2018
  • Regular IR Distance Sensor Vs Sharp IR Distance Sensor (Arduino, Pi) April 24, 2018

About This Article

Title: How to Use vi Text Editor
January 24, 2015
Author: Abhishek Ghosh
Subjects: Computer and Internet, General
Is Part Of:

TheCustomizeWindows, January 24, 2015, Vol.1(01),
p.1–39075 [IoT Ready Journal]

Source:The Customize Windows
ISSN: 0019-5847 ;
E-ISSN: 0019-5847 ;
Publisher: jima.in

Cite this article as: Abhishek Ghosh, "How to Use vi Text Editor," in The Customize Windows, January 24, 2015, April 25, 2018, https://thecustomizewindows.com/2015/01/use-vi-text-editor/.
This website uses cookies.

Read Cookie Policy

Contents are copyright protected and reproduction demands our permission.


PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

web analysis

Copyright © 2018 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy