1. Vim: The Modal Editor
- Open Vim: In a terminal, type
vim
. - Navigate: Use the arrow keys to move around the text.
- Edit: Press
i
to enter insert mode, then type your text. Pressesc
to return to normal mode. - Save and quit:
Type :wq
and press Enter.
2. Nano: The Simple Editor
- Open Nano: In a terminal, type
nano
. - Edit: Type your text directly.
- Save and quit: Press
Ctrl+X
, thenY
to confirm, andEnter
.
3. Gedit: The Graphical Editor
- Open Gedit: Click on the Gedit icon in your applications menu.
- Edit: Use the mouse and keyboard to edit your text.
- Save and quit: Click "File" -> "Save" and then "File" -> "Quit".
4. GVim: The Graphical Vim
- Open GVim: In a terminal, type
gvim
. - Navigate and edit: Use the same commands as Vim, but with a graphical interface.
- Save and quit: Type
:wq
and press Enter.
Lab Exercises:
- Create a new file: Use each editor to create a new file named
example.txt
. - Write some text: Type a few lines of text into each file.
- Save and quit: Save the files and exit each editor.
- View the files: Use the
cat
command in the terminal to view the contents of the files. - Edit the files again: Open each file again and make some changes.
- Save and quit: Save the changes and exit the editors.
No comments:
Post a Comment