Linux Text editor vim

Source: Internet
Author: User
Tags linux text editor
About VIM

Vim is a powerful full-screen text editor, which is the most common text editor on Linux/unix, which is used to create, edit, and display text files.

Vim has no menu, only commands

Three modes of VIM: Command mode, insert mode, edit mode

lowercase letters i/a/o from command mode to insert mode

Return from Insert mode to command mode with ESC key

From command mode to edit mode (Find/Set/exit/save, etc.) with ":"

Returning from edit mode to command mode with a carriage return, indicating that the command ends with a return run

Import command execution result: R! Command example: R/etc/issue Import the contents of the file to the current cursor position; r!data Import the current time to the cursor position

Define shortcut keys: Map Shortcut Trigger command example: Map ^p i#<esc> (^p button Ctrl + V ctrl+p) map ^b 0x

Continuous line Comment: n1,n2s/^/#/g n1,n2s/^#//g n1,n2s/^/\/\//g

Replacement: AB mymail [email protected]

To retain VIM configuration for a long time: Edit the./vimrc file in the current user's host directory

Linux Text editor vim

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.