juaner's Blog

千里之行,始于足下。

vi操作模式

juaner posted @ Sun, 02 Oct 2011 15:00:07 +0800 in linux , 1203 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* 插花課程

Avatar_small
Matthew Wade said:
Thu, 13 Feb 2025 15:53:29 +0800

Your blog would increase in ranking if you post more often.,-`~- 美国代写

Avatar_small
Matthew Wade said:
Mon, 17 Feb 2025 15:15:25 +0800

Wow!, this was a top quality post. In concept I’d like to publish like this as well – taking time and real effort to make a nice article… but what can I say… I keep putting it off and never seem to get something done binary signals

Avatar_small
Matthew Wade said:
Mon, 03 Mar 2025 22:35:45 +0800

There are many famous persons with dyslexia and it is not a debilitating disease. Tom Cruise is known to be dyslexic:: swivel bar stools

Avatar_small
Jackson said:
Sat, 08 Mar 2025 19:13:21 +0800

Really nice pattern and fantastic content , very little else we need. Custom Trophies

Avatar_small
Jackson said:
Fri, 21 Mar 2025 23:22:39 +0800

I am continually looking online for articles that can facilitate me. Thank you! TB2X Portaal

Avatar_small
Jackson said:
Sat, 22 Mar 2025 18:05:01 +0800

There is noticeably a lot of money to comprehend this. I assume you made certain nice points in features also. Udangbet

Avatar_small
Jackson said:
Fri, 04 Apr 2025 19:49:23 +0800

Took me awhile to read all the comments, but I really enjoyed the article. It proved to be very helpful to me and I am sure to all the commenters here! It’s always nice when you can not only be informed, but also entertained! I’m sure you had fun writing this article. Mantap168


Login *


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