vi editing  «Prev 

sample .exrc file

The diagram above displays the elements of a .exrc file
The diagram above displays the elements of a .exrc file.

.exrc file
  1. cat .exrc: After creating an .exrc file (using vi, for example), you can use the cat .exrc command to display the contents. Whenever vi is started, it reads the .exrc file.
  2. Both ab commands: Using the ab command, you can define two text abbreviations, ec1 and tsh, which can prevent repeated typing of long phrases.
  3. Both map commands: With the map command, you can define the V key to transpose two words. The v key also can be defined as a shortcut to :wq.
  4. 1st set command: Two configuration options have been defined with a single set command. showmode tells you you are in text mode, and wrapmargin=7 tells the cursor to "wrap around", or move to the beginning of the next line, when the cursor gets within 7 characters of the right margin.
  5. 2nd set command: The set ic command causes text searches to ignore case, or treat uppercase and lowercase letters the same.