Reputation:
Can you please help me using vi editor for programming
Upvotes: 2
Views: 5007
Reputation: 23512
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.
Upvotes: 1