问题1:如何在vi编辑器中,显示行号
2014-09-01 10:38
399 查看
目的:linux 环境下,vi 编辑器中显示行号
1. 利用vi 命令打开一个文件:
$ vi oratab
2.在命令行模式下, 输入“冒号 + set nu” 命令,点击回车,就可以显示每行的行号
:set nu
操作过程:
/***********************************************************************/
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
radius:/home/oracle/app/oracle/product/10g:Y
~
~
:set nu
/***********************************************************************/
或者
在编辑模式下,敲击键盘上的"Esc"键回到命令行模式,输入“冒号 + set nu” 命令,点击回车,也可以显示每行的行号
返回结果如下:
/***********************************************************************/
1 #
2
3
4
5 # This file is used by ORACLE utilities. It is created by root.sh
6 # and updated by the Database Configuration Assistant when creating
7 # a database.
8
9 # A colon, ':', is used as the field terminator. A new line terminates
10 # the entry. Lines beginning with a pound sign, '#', are comments.
11 #
12 # Entries are of the form:
13 # $ORACLE_SID:$ORACLE_HOME:<N|Y>:
14 #
15 # The first and second fields are the system identifier and home
16 # directory of the database respectively. The third filed indicates
17 # to the dbstart utility that the database should , "Y", or should not,
18 # "N", be brought up at system boot time.
19 #
20 # Multiple entries with the same $ORACLE_SID are not allowed.
21 #
22 #
23 radius:/home/oracle/app/oracle/product/10g:Y
/***********************************************************************/
--END--
1. 利用vi 命令打开一个文件:
$ vi oratab
2.在命令行模式下, 输入“冒号 + set nu” 命令,点击回车,就可以显示每行的行号
:set nu
操作过程:
/***********************************************************************/
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
radius:/home/oracle/app/oracle/product/10g:Y
~
~
:set nu
/***********************************************************************/
或者
在编辑模式下,敲击键盘上的"Esc"键回到命令行模式,输入“冒号 + set nu” 命令,点击回车,也可以显示每行的行号
返回结果如下:
/***********************************************************************/
1 #
2
3
4
5 # This file is used by ORACLE utilities. It is created by root.sh
6 # and updated by the Database Configuration Assistant when creating
7 # a database.
8
9 # A colon, ':', is used as the field terminator. A new line terminates
10 # the entry. Lines beginning with a pound sign, '#', are comments.
11 #
12 # Entries are of the form:
13 # $ORACLE_SID:$ORACLE_HOME:<N|Y>:
14 #
15 # The first and second fields are the system identifier and home
16 # directory of the database respectively. The third filed indicates
17 # to the dbstart utility that the database should , "Y", or should not,
18 # "N", be brought up at system boot time.
19 #
20 # Multiple entries with the same $ORACLE_SID are not allowed.
21 #
22 #
23 radius:/home/oracle/app/oracle/product/10g:Y
/***********************************************************************/
--END--
相关文章推荐
- 如何使vi编辑器一打开就显示行号及取消按空格显示颜色
- C#.NET常见问题(FAQ)-Visual Studio VS如何显示行号
- vc6.0如何显示行号以及出现版本不兼容问题
- C#.NET常见问题(FAQ)-Visual Studio VS如何显示行号
- Struts迭代问题解决:如何在一行显示多个记录(同一字段)
- JavaScript--如何显示年月日及星期问题
- 最近被一个问题困扰着,如何实现类似Photoshop的多层图像操作,每层可单独操作,又可以组合显示出来。
- ※如何解决Struts中的ActionErrors怎么才能在页面上显示出来的问题?※
- 如何解决从mysql中读取数据时显示为乱吗的问题.
- eclipse 中如何显示行号
- 如何解决ASP.NET中中文不能正常显示问题
- Weblogic Server中如何解决中文显示乱码问题
- 如何解决IE6的显示问题
- 一个古老的问题—如何在WinForm中显示Splash Screen
- 向大家请教一个关于sharepoint2003的问题,如何使一个Custom List in Datasheet View中某个field从其他list抽取数据当显示时?
- 如何解决ASP.NET中中文不能正常显示问题?
- PythonWin Editor如何显示行号
- iTextSharp应用中关于“Cannot access a closed Stream”问题的解决办法(附带提供如何在页面中显示PDF的流)
- 关于文章列表如何直接显示文章类别名的问题
- 如何解决MSHFlexGrid控件不能显示的问题