| United States-English |
|
|
|
![]() |
Using Your HP Workstation > Chapter 17 Using the vi EditorMaking Your vi Environment Permanent |
|
To avoid setting options or defining abbreviations or macros each time you enter vi, place all options and definitions you normally use into an .exrc file in your home directory. This file is read automatically each time you enter vi and its contents make your customized vi environment permanent. To create or change the .exrc file, follow these steps:
After creating the .exrc file, you can access it whenever you want to change your vi environment. Any of the editor options discussed in the previous section can be placed in this file. In “Using Options to Change Your vi Environment”, you saw examples of some of the options that change the overall behavior of vi. You can also make vi recognize short forms of commonly used expressions by using ab to define an abbreviation. If you include the following options and abbreviations in your .exrc file:
Then you have changed your vi environment so that each time you enter vi, you can expect the following:
For more information on this versatile editor, see The Ultimate Guide to the vi and ex Text Editors. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||