• 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

This Article Has Been Shared 785 Times!

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

  • 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 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

  • What is Configuration Management February 5, 2023
  • What is ChatGPT? February 3, 2023
  • Zebronics Pixaplay 16 : Entry Level Movie Projector Review February 2, 2023
  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023

About This Article

Cite this article as: Abhishek Ghosh, "How to Use vi Text Editor," in The Customize Windows, January 24, 2015, February 5, 2023, https://thecustomizewindows.com/2015/01/use-vi-text-editor/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT