2 vi EDITOR FOR UNIX FILES
One of the origins of Alephino is ALEPH500 which is only operable on UNIX/Linux systems. The preferred tool for text processing that's available on every UNIX platform is the "vi"-editor.
Since neither installation nor setup of an ALEPH system can be done without making modifications to control files at OS level, which sometimes is also useful for Alephino, we added this chapter.
vi commands to edit a file
vi commands are used to enter text into a UNIX file.
All vi commands are activated by first pressing the ESC key.
You can also cancel an incomplete command by pressing the ESC key.
- Moving around the file
- up arrow - to move up one line
- Pfeil nach unten - down arrow
- 0 - moves the cursor to the beginning of the line
- $ - moves the cursor to the end of the line
- Enter - moves the cursor to the beginning of the next line
- H - moves the cursor to the top line on the screen
- L - moves the cursor to the last line on the screen
- Ctrl-u - scrolls up one-half screen
- Ctrl-d - scrolls down one-half screen
- Ctrl-f - scrolls forward one screen
- Ctrl-b - scrolls backward one screen
- Adding text to a file
- a - to append text after the cursor
- A - to append text after the end of the line
- i - to insert text before the cursor
- I - to insert text at beginning of line
- o - to open a line below current line
- O - to open a line above current line
- Changing text
- r - to replace the character at the cursor
- R - to overwrite the text from the character till the next esc.
- cw - to change a word
- cc - to replace the current line
- Deleting text
- x - to delete the characater at the cursor
- dw - to delete the word that the cursor is on
- dd - to delete the line that the cursor is on
- D - to delete the rest of the line
- Undo
- u - to undo the last change
- Cut/Paste
- yy - to copy the current line into the buffer
- yw - to copy the text from the cursor to the next space
or end of line
- p - to paste after the cursor
- Searching
- /string - to search forward
- ?string - to search backward
- n - to find next occurrence of the search string
- Saving and Quitting
- :w - to save the file under its original name
- :wq - to save the file and quit
- :q! - to quit without saving
- Miscellaneous commands
- J - joins lines
- . - repeats the last change