• Home
  • Archive
  • Tools
  • Contact Us

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
You are here:Home » 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.

Advertisement

---

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.

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 Pinterest

Abhishek Ghosh

About Abhishek Ghosh

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

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

Articles Related to How to Use vi Text Editor

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • OpenShift OctoPress Auto install Script

    OpenShift OctoPress Auto install Script is an Advanced Script to Run OctoPress on Free OpenShift PaaS Practically Without Any Knowing Ruby or Git.

  • OpenStack Swift & HPCloud CDN PHP Bindings : Basics

    Here is the basics of OpenStack Swift & HPCloud CDN PHP Bindings for the WordPress Plugin developers and those who works with PHP based CMS.

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 Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

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

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are 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

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

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

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