How to create a .exrc file in vi editor?



How to create a .exrc file in vi editor?..

Answer / nipesh

Introduction

This article presents a sample .exrc file that can be used
by users of the vi editor. The .exrc file, located in your
home directory, is the startup (or configuration) file for
the vi editor.

The intent of this brief article is to show some of the
ways you can modify the configuration of the vi editor



Please note that the .exrc file contains commands that Vi
reads when you first run it. The default directory that Vi
looks in for the .exrc file is your home directory.
However, if you run Vi from another directory containing
a .exrc file, Vi will use the .exrc in that directory and
bypass the home directory .exrc. You must precede control
characters (like ^[ or ^M) with CONTROL-V. For example to
enter ^M, type CONTROL-V CONTROL-M.


Some important points for .exrc files:

Do not allow any blank lines in the file or processing will
stop on that line.
Comments are introduced by starting a line with a double
quote: "
All directives, whether options, abbreviations, or key
macros must all be typed on a single line. The listing
below has had the lines broken up for the sake of
readability.
Control characters like [tab],[linefeed],[escape] can be
inserted by first typing ^V (hold down Ctrl, and press V),
followed by the character. For instance, for [tab], hold
Ctrl and press V, release Ctrl, hit [tab]. You'll see ^I.
This is evident in the listing below.
For VIM the corresponsing file is .vimrc (_vimrc in case of
windows).
***********************************************************
Nipesh janghel
Nippucompu Dictionary developed

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Vi Editor Interview Questions

what are the different commands used to quit from the vi editor?

1 Answers  


what is the command used to append text after current line?

3 Answers  


How to create a .exrc file in vi editor?

1 Answers  


what does the c$ command do from command mode?

5 Answers  


How to enter from command mode to insertion mode?

3 Answers  






what are the two different modes in vi editor?

7 Answers  


What is the difference between ZZ and :wq commands?

4 Answers  


How to return to shell without leaving vi editor?

2 Answers  


How to append a file to current file?

3 Answers  


What is the format of vi command?

2 Answers  


what is the command used to delete current line in vi editor?

2 Answers  


HOW WE CAN MAKE THE DLIEVERY WHICH IS BLOCKED DUE TO CREDIT LIMIT.

0 Answers   Seamless,


Categories
  • Vi Editor Interview Questions Vi Editor (21)
  • Visual Studio IDE Interview Questions Visual Studio IDE (207)
  • Editors AllOther Interview Questions Editors AllOther (1)