2

Can you please help me using vi editor for programming

  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

1 Answers1

1

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

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

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

ESC + :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

sorry for the formatting of this post.

slayedbylucifer
  • 22,878
  • 16
  • 94
  • 123