viで行番号を表示

vi 実行中に以下の設定を行うと、行番号が表示されるようになります。

:set number

以下、実行結果の例です。

 1 #
 2 # This is the main Apache HTTP server configuration file.  It contains the
 3 # configuration directives that give the server its instructions.
 4 # See url:http://httpd.apache.org/docs/2.2 for detailed information.
 5 # In particular, see
 6 # url:http://httpd.apache.org/docs/2.2/mod/directives.html
 7 # for a discussion of each configuration directive.
 8 #
 9 # Do NOT simply read the instructions in here without understanding
10 # what they do.  They're here only as hints or reminders.  If you are unsure