File Management Conclusion
Creating Aliases Unix
list current Aliases
Displaying Previous Commands
Repeating Previous Commands
Modifying Previous Command
Changing System Prompt
Storing shell Settings
Sample cshrc File
Grep Regular Expression
Using Quotes with Regex
Matching Pattern Occurrences
Matching Pattern Position
Turnoff Character Meaning
Pattern Matching - Quiz
editing with vi
Text in vi
Creating Command Shortcuts
Configure Editing Environment
Storing Custom Settings
Esditing Multiple Files
Pasting Text Files
vi Editing Conclusion
Managing Disk Space
Storing Custom Settings for vi - Exercise
Course project: Creating an
file to store some custom vi settings.
You will receive 5 points for this exercise.
As you work on the eCyberCom web site, you will frequently use vi to edit files. To make editing easier, you have decided to customize vi by adding commands to your
file. Your course account already gives you an
file, so you will edit the existing file rather than creating a new one.
In this exercise, you will define a keyboard map, an abbreviation, and a vi configuration option.
Instructions, Part I
Log in to your course account.
In your home directory, use the vi editor to open the file named
Define some text abbreviations, keyboard maps, or configuration options that you would find useful while editing the web site files.
When you are finished, save your changes and quit vi.
Test your new
settings. Using vi again, open an existing file or create a new file.
In the file, use the
commands to list your abbreviations, maps, and options. Do they appear as you defined them in
Now edit your
file and add intentional mistakes. For example, add a blank line as the first line, or use uppercase letters for the commands (
Write and quit the
Start another vi session, and check your settings again by entering
. Are your intended
settings listed this time?
Fix your .exrc file..
When you are done, quit vi and log out.
You can define multiple options using a single
command. For example, in your
file, you can type a single line that reads,
set ic showmode
Instructions, Part II
settings you created for Part I and describe what each command does and why you created it.
You will notice that your
file already contains the line
. As you add new lines of text, it doesn't matter whether you add them above or below the existing line. It doesn't matter in what order you place your custom settings.
file, using a colon (:) before the
commands is optional.
If you made errors while editing your
file, your custom settings might not take effect as you expect. You can check your results byvusing
to list your definitions. To fix errors, open the
file in vi and make thevnecessary edits.
Submitting your exercise
Submit your exercis clicking the submit button below.