Most Linux server runs without a graphical interface and the most sure installed editor for file is the vi editor. But getting used with vi can be a little challenging. Below I will show you the most common vi commands.
| Open | vi file.txt |
| Close without saving | :q! |
| Insert | i |
| Quite editing | ESC |
| Write and close | :wq |
| Copy line and paste line | yy + p |
| Delete line and paste line | dd + P (capital) |
| Change word | cw |
| Browse to next work | w |
| Browse to previous work | b |
| Go to first line | 1G |
| Go to last line | G |
No comments:
Post a Comment