Detailed explanation of Linux text editor Vim

Detailed explanation of Linux text editor Vim

Vim is a powerful full-screen text editor and the most commonly used text editor on Linux/UNIX. Its function is to create, edit and display text files. Vim has no menus, only commands. (Used when editing some configuration files and writing some simple scripts)

Vim's three working modes: command mode, insert mode, and edit mode
vi [file name] –> Enter command mode, enter iao to enter insert mode Command mode: enter wq to exit; enter iao to enter insert mode; enter: Enter edit mode Insert mode: ESC to exit command mode Edit mode: Enter to end the command

Insert command:

Positioning command:


Delete command:


Copy and Cut commands:


Replace and undo commands:


Search and search-replace commands:


Save and exit commands:

Vim Tips

Import command execution result: r! Command definition shortcut key: map Shortcut key trigger command example: map ^PI#
:map ^B 0x
Note: Ctrl+v, Ctrl+p produces ^P effect, or Ctrl+v+p

The above is a detailed explanation and integration of the Linux text editor Vim introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Linux Vim Practical Commands Explained
  • How to operate vi and vim editors in Linux
  • Introduction to vim plugin installation under Linux system

<<:  How to implement the singleton pattern in Javascript

>>:  Mysql optimization Zabbix partition optimization

Recommend

HTML drag and drop function implementation code

Based on Vue The core idea of ​​this function is ...

Detailed explanation of the solution to Tomcat's 404 error

The 404 problem occurs in the Tomcat test. The pr...

Solution to forgetting the root password of MySQL 5.7 and 8.0 database

Note: To crack the root password in MySQL5.7, you...

Analysis of the principles of Mysql dirty page flush and shrinking table space

mysql dirty pages Due to the WAL mechanism, when ...

How to use macros in JavaScript

In languages, macros are often used to implement ...

How to implement Mysql switching data storage directory

How to implement Mysql switching data storage dir...

MySQL 5.7.19 (tar.gz) installation graphic tutorial under Linux

The first tutorial for installing MySQL-5.7.19 ve...

MySQL 5.7 cluster configuration steps

Table of contents 1. Modify the my.cnf file of se...

How to set and get the number of Mysql connections

Get the number of connections --- Get the maximum...

Automatically build and deploy using Docker+Jenkins

This article introduces Docker+Jenkins automatic ...

Vue implements a simple shopping cart example

This article shares the specific code of Vue to i...

About the selection of time date type and string type in MySQL

Table of contents 1. Usage of DATETIME and TIMEST...

Detailed explanation of scheduled tasks for ordinary users in Linux

Preface Ordinary users define crontab scheduled t...

Introduction to user management under Linux system

Table of contents 1. The significance of users an...