Unix Vi Editor Commands to Save, Quit

In Vi editor Save, Quit without saving and Save and quit are tricky commands. I have given these commands for your reference.

w - To Save Your Work
q - To Quit
wq - To Save and Quit

vi editor also called Visual editor in terms of Unix or Linux or Ubuntu Operating systems. Since all are the same UNIX flavor, and UNIX is the mother of all these operating systems.

Recently many of my friends asked to share some daily use vi editor commands. I am sharing those for your quick reference.

Vi Editor Top Commands for Your Projects and Interviews

1. How to Edit a file?

vi filename

This is the first command to use for editing a file.

2. A command to Repeat Previous Command?

Use the UP arrow to repeat the previous command.

3. How to Insert data?

Use insert command to over-type data.

4. How to Save File?

Press Esc

5. How to Save and Quit (Exit)?

Press Esc

6 How to quit without Save?

Press Esc


Popular posts from this blog

How to Fix Python Syntax Errors Quickly

Python Ideas to Remove HTML tags

Hyperledger Fabric: 20 Real Interview Questions

Python: Swap Two Strings no need to Define Third Variable

Calculate Circle Area the Logic You Need to write in Python