VI One of the cursor movement commands

Source: Internet
Author: User

I. Overview

The basic cursor movement commands in VI are: H, J, K, L.

Where h moves the cursor 1 bits to the left, J moves the cursor down 1 lines, K moves the cursor up 1 lines, and L moves the cursor to the right 1 bits.

The above command supports the "number + command" format and moves multiple bits (lines) 1 times.

Ii. examples

Initial state

01234

0123

012

Run command: l

01234

0123

012

Run command: 3l

01234

0123

012

Run command: J ( Note: The 1th line is more than line 2nd, run the J command, the cursor moves to the last 1 bits of the next 1 lines )

01234

0123

012

Run command: K ( Note: The 1th row is more than line 2nd, run the K command, the cursor moves to the previous 1 lines before the J command position, in this case 4)

01234

0123

012

Run command: 2j

01234

0123

2

Run command: H

01234

0123

012

VI One of the cursor movement commands

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.