VI Editor in Git is the default editor, in any system that helps to edit file nothing to do with Git
Add a new file using vi editor
this create a new file and open editor to add some text in this file
This editor has some commands to work with
- i- to insert new content in you file
- add some text
- esc - to come out from insert mode
- :w - save your connect in this file
- :q: to quit from editor
Check your content in this file
- cat basic.txt
Force Quit without Saving your changes
- esc to come out from insertion mode and
- :q! - to force quite the editor without saving
Write and Quit at same time
- esc and then :wq
Delete a particular line
- Open file in vi editor, Go to that line and press dd (don't go to insert mode)