juaner's Blog

千里之行,始于足下。

vi操作模式

juaner posted @ Sun, 02 Oct 2011 15:00:07 +0800 in linux , 1154 readers
  1. 如果直接输入“vi”,系统会打开一个其实画面,如果要输入命令,必须先输入冒号(:)将光标停留在屏幕的下方后,才可进行命令的输入,如果没有输入冒号,则系统无法接受任何命令。
  2. vi共包含3种基本操作模式:Command Mode、Insert Mode或Last Line Mode,功能分别为:

     Command Mode:控制光标的移动,删除字符,区段复制,以及进入两外两种模式。

     Insert Mode:进行文字数据的输入,按ESC可以回到上一种模式。

     Last Line Mode:保存、退出以及进行其他的设置,如查找或者替换字符串。

 3、三种命令:i(由当前的光标位置输入文字);a(APPEND:由目前光标的下一个位置输入文字);o 插入新行,并由行首开始输入文字。

 4、在Command Mode下,要想回到Last Line Mode模式,必须按:键。

 5、Command Mode功能键包含有移动光标,复制文字,删除文字以及其他用法。

 6、Last Line Mode的功能键不多,其中的退出命令有:

    q:但如果文件内容有修改,vi会出现错误信息,并要求使用“!”;

    q!:强制退出vi,并且不存盘。

    wq:将修改过的内容存盘,并且退出vi。

7、查找字符串的时候,在Command Mode模式下,按下“/”,光标自动移到下面的命令行,输入带搜索的字符串,按下“Enter”键可以开始搜索。

8、其他

  0 表示行首,$表示行尾,d表示删除,f表示forward。

 

 

Avatar_small
meidir said:
Sun, 04 Dec 2022 22:46:40 +0800

There is noticeably a lot of money to know about this. I assume you’ve made certain nice points in features also. 승무패

 

================

 

Glad to be one of several visitors on this awe inspiring internet site : D. 攝影器材

Avatar_small
meidir said:
Thu, 12 Jan 2023 17:23:17 +0800

Excellent blog here! Also your site loads up very fast! What host are you using? Can I get your affiliate link to your host? I wish my site loaded up as fast as yours lol 온라인바카라

Avatar_small
meidir said:
Sun, 19 Feb 2023 15:17:25 +0800

I feel that is among the so much important info for me. And i’m satisfied studying your article. However wanna commentary on some normal things, The site taste is ideal, the articles is actually nice . Good task, cheers. 슈어맨

Avatar_small
meidir said:
Wed, 23 Aug 2023 22:32:06 +0800

there are tanning lotions which are very hard on the skin, i always use organic tanning lotions* 插花課程


Login *


loading captcha image...
(type the code from the image)
or Ctrl+Enter