Chinaunix首页 | 论坛 | 博客
  • 博客访问: 571101
  • 博文数量: 50
  • 博客积分: 571
  • 博客等级: 中士
  • 技术积分: 1162
  • 用 户 组: 普通用户
  • 注册时间: 2012-01-20 14:01
个人简介

希望成为一个有思想,有信仰的程序设计师。

文章分类

全部博文(50)

文章存档

2016年(2)

2015年(2)

2014年(13)

2013年(10)

2012年(23)

分类: C/C++

2012-11-23 22:16:20

1.insert:

i  :inserts a character before  the character under the cursor

a :insert text after the cursor(append)

o :open up a new line below  the cursor

2.Deleting

dd : deletes the line on which the cursor is positioned

d[n]w  :deletes n words begin with the cursor once

[n]dw :deletes only one word every time but repeat operation n times.

3.Movement Commands

[n]$ :Moves to the end  of the N-th line,begin with current line.

[n]^ :Moves to the first nonblank character of the N-th line,begin with current line.

[n]G  :Puts you on line n from current cursor.

h       :  move left

j        : move down

k       : move up

l        : move right

g0     :go the begin of the current line  

g$     :go the end of the current line

gm    :go the middle of the current line

notice:the " [n] " just express an Integer ,such as "1"

4.Undo and Redo

u : undo the changes

: restore the changes

5.Position(where am i)

:set number : display the line number

: detail about the current position

6.Copy and paste

yy  : copy current line

p   : put a register after the cursor position .In other word ,paste the buffer next line of the cursor.

 

notice : almost all the command listed can inserted an Integer n before ,and it means repeat the command n times.

Reference

[1] vimguide-0.7-a4-1200.pdf

[2] vimbook-OPL.pdf

阅读(921) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~