Manually Editing DCM Controller Files
vi Editor
vi Editor
To edit or view files on the DCM Controller, use the vi editor, a commonly used Linux text editor.
The vi editor has three modes:
■Command
■Insert
■Replace
Command Mode
When you access vi and open a file, you are typically in the command mode: you can enter any of the commands outlined in Table
Table B-2. vi Editor Commands
Action | Command |
|
|
Enter insert mode, which allows you to add or delete text in the file: |
|
Characters are entered into the file after the cursor. | a |
Characters are entered into the file before the cursor. | i |
Enter replace mode, which allows you to write new text over | R |
existing text, beginning at the cursor. |
|
Delete a character | x |
Delete N characters | Nx |
Delete a word | dw |
Delete N words | dNw |
Delete a line | dd |
Delete N lines | Ndd |
Copy current line | yy |
Copy N lines, beginning with the current | Nyy |
Paste copied lines back into the file | p |
Undo last change in file; enter command again to redo change | u |