Antiquity Artifact--vim Editor

Source: Internet
Author: User
Tags clear screen

Ancient artifact, presumably we will associate to the XX TV drama, the ancient artifact is not Donghuang clock, shaft sword, Pangu, refining demon pot, Hao Tian Tower, Fuxi Qin, Shennong Ding, Kong Tong Printing, Kunlun Mirror, nu wa stone. It is the ancient artifact of the TV series, it is the ancient artifact--vim editor that the IT world wants to speak today.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/86/64/wKioL1e9gziB8edsAAD9KN3WnxY218.jpg "title=" Vim.jpg "alt=" Wkiol1e9gzib8edsaad9kn3wnxy218.jpg "/>

For an artifact, the protagonist is often to pay some effort to gain more powerful power to do, for the vim of this ancient artifact, it June said nothing more.

First, the basic introduction of VIM

1, vim from the development of the VI, can achieve code completion, compilation and error jumps and other convenient functions.

2, VIM has the mode of the points, respectively, is the general instruction mode, editing mode and command-line order mode.

The general instruction mode, can carry on the cursor movement and the duplication paste and so on.

Edit mode is to edit the file directly.

Instruction-column command mode, that is, in instruction mode, enter [:/?] Under one of the buttons, you can search or replace.

3, flexible, personalized. As long as you have the need, you can modify the VIMRC configuration file, and make it into their own different ancient artifacts.

Second, download the installation

It's nothing to say.

Linux platform: #yum install-y vim

Windows platform: Directly on the GVIM official website download installs (the Fool type Point goes down just fine)

Third, harness

How to harness the artifact. This is the place to practice.

1, the General Command line mode, press ESC to enter the command line mode. The common commands are:

i:Insert mode, press ESC back to Normal mode.

  x: Deletes the character at which the current cursor is located.

  :wq:Save + exit (save :w , :q exit)

: q!: Force quit, do not save the modified content.

   dd:Delete the current row and save the deleted row to the Clipboard

   p:Paste Clipboard

YY: Copy the command line where the cursor is located

HJKL: Move cursor (recommended, do not use arrows)

2. Edit mode

A: Insert after cursor

o: Insert a new row after the current line

O: Insert a new row before the current line

......

With a good artifact, how could it be that a good sword spectrum is missing, the sword spectrum is as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/86/64/wKiom1e9jFGSr2OaAAeWd8kkuwk141.jpg "title=" Vim shortcut key atlas. jpg "alt=" wkiom1e9jfgsr2oaaaewd8kkuwk141.jpg "/>

Above is to practice this ancient artifact of the sword spectrum, I believe that the completion of cultivation, not alone to seek defeat, at least can mingle with it lakes.


Iv. Auxiliary

Next, there are some common shortcut keys for the shell command line.

1. Delete

Ctrl+d: Delete the character at the position where the cursor is located

Ctrl+h: Delete the character before the cursor position

Ctrl+k: Delete all characters after the cursor

Ctrl+u: Delete all characters preceding the cursor

Ctrl+w: Delete the previous word of the cursor

Ctrl+y: Restore the last deleted character

CTRL +? : Undo Previous input


2. Mobile

CTRL + A: Move the cursor to the beginning of the command line

Ctrl+e: Moves the cursor to the end of the command line

CTRL+F: Moves the cursor backward one character

CTRL+B: Moves the cursor forward one character

CTRL + ARROW key left: Moves the cursor to the beginning of the previous word

CTRL + Arrow Right: Moves the cursor to the end of the next word

Ctrl+x: Jumps between the last character of the cursor and the character at which the current cursor is located

3. Replace

Ctrl+t: Replaces the current character of the cursor with one of the preceding characters


4. Historical command editing

Ctrl+p: Returns the last input command character

Ctrl+r: Enter word search history command

5. Other common commands

Ctrl+s: Lock the terminal

CTRL+Q: Unlocking the terminal

Ctrl+l: Clear screen (i.e. clear command)

Ctrl+i: Similar to tab completion function

Ctrl+o: Repeating commands


Five, play strange upgrade

If you have the skills to defend the front, then it is in the daily work of constant practice familiar, to get out of the keyboard, also can operate freely, have to say it June is also on this road to play strange upgrade.

Borrowed Qu Yuan's sentence, the road long its repair far XI, I will go up and down and quest.













This article is from the "9305074" blog, please be sure to keep this source http://9315074.blog.51cto.com/9305074/1852843

Antiquity Artifact--vim Editor

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.