在EC2服务器上的vi编辑器中工作 [英] Working in vi editor on ec2 server

查看:116
本文介绍了在EC2服务器上的vi编辑器中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我使用vi编辑器进行编程

Can you please help me using vi editor for programming


  1. 如何关闭窗口,保存打开页面的内容。 //我使用Esc wq:但它会保持打开窗口

  2. 删除所选内容

  3. 直接转到// Esq /。其他任何方式

  4. 在同一窗口中打开新文件而不关闭旧文件

  1. How to close the window, saving the content of opened page. // I use Esc wq: but it keep open the window
  2. Deleting selected content
  3. going to direct line // Esq /. any other way
  4. Opening new file in same window without closing older one


推荐答案


如何关闭窗口,保存打开页面的内容。 //我使用Esc wq:但它会保持打开窗口

How to close the window, saving the content of opened page. // I use Esc wq: but it keep open the window



 ESC + :wq




删除所选内容

Deleting selected content

如何在VI中选择内容?要删除一行,请按 dd 。要删除2行,请按 2dd ...依此类推

how do you select content in VI ? to delete a line, press dd. To delete 2 lines, press 2dd... so on and so forth


转到直线// // Esq /。

going to direct line // Esq /. any other way



ESC + :120

以上组合将带您到行号。 120.或在以下命令下运行:

above combination will take you to line no. 120. OR run below command:

vi +120 file_name




在同一窗口中打开新文件而不关闭旧文件

Opening new file in same window without closing older one



ESC + :split new_file_name

抱歉帖子的格式。

这篇关于在EC2服务器上的vi编辑器中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆