免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: cnxiao
打印 上一主题 下一主题

如何显示VI的当前模式? 谢谢!! [复制链接]

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
11 [报告]
发表于 2007-01-26 08:51 |只看该作者
多实际操练,慢慢的熟悉了就可以了.

论坛徽章:
0
12 [报告]
发表于 2007-01-26 09:04 |只看该作者
用惯了vi后,经常会有事没事的就去按一下esc键,呵呵~~~

论坛徽章:
0
13 [报告]
发表于 2007-01-26 09:46 |只看该作者
:set smd                            (will show the mode in bottom right corner)

论坛徽章:
0
14 [报告]
发表于 2007-01-26 17:32 |只看该作者

回复 #13 Gary_xy 的帖子

HI Gary_xy

1.Can you tell me how to use set smd.

Below is the picture when I open a simple text file with vi before using set showmode command.

###########################################

###########################################

Below is the picture when I open a simple text file with vi after using set showmode command.

###########################################

###########################################

And can you tell me how to user set showmode command when I am in the insert mode.

Thanks.



[ 本帖最后由 beautiful 于 2007-1-26 17:55 编辑 ]

论坛徽章:
0
15 [报告]
发表于 2007-01-26 18:00 |只看该作者
esc    :wq 或:q 或 :q!
panpass 该用户已被删除
16 [报告]
发表于 2007-01-26 18:47 |只看该作者
提示: 作者被禁止或删除 内容自动屏蔽

论坛徽章:
3
CU大牛徽章
日期:2013-03-13 15:15:08CU大牛徽章
日期:2013-03-13 15:26:06CU大牛徽章
日期:2013-03-13 15:26:47
17 [报告]
发表于 2007-01-26 20:19 |只看该作者
Set SHOWMODE

论坛徽章:
0
18 [报告]
发表于 2007-01-26 22:06 |只看该作者
多用用ESC就行了!我以前也不太会!

论坛徽章:
0
19 [报告]
发表于 2007-01-28 23:10 |只看该作者
To 14, 我觉得不能在insert mode下使用:set命令。参考楼上几位朋友的提示,我又查了一下vi设置方面的资料。

1,查看当前vi设置,使用:set all命令,它显示的是当前vi的是设置,下面是我的VI设置:
noaltwerase     noextended      mesg            report=5        term="xterm"
noautoindent    filec=""        nomodeline      noruler         noterse
autoprint       flash           msgcat="./"     scroll=11       notildeop
noautowrite     hardtabs=0      noprint=""      nosearchincr    timeout
backup=""       noiclower       nonumber        nosecure        nottywerase
nobeautify      noignorecase    nooctal         shiftwidth=8    noverbose
cdpath=":"      keytime=6       open            noshowmatch     warn
cedit=""        noleftright     optimize        showmode        window=23
columns=80      lines=24        path=""         sidescroll=16   nowindowname
nocomment       nolisp          print=""        noslowopen      wraplen=0
noedcompatible  nolist          prompt          nosourceany     wrapmargin=0
escapetime=3    lock            noreadonly      tabstop=8       wrapscan
noerrorbells    magic           noredraw        taglength=0     nowriteany
noexrc          matchtime=7     remap           tags="tags"
directory="/tmp"
paragraphs="IPLPPPQPP LIpplpipbp"
recdir="/var/tmp/vi.recover"
sections="NHSHH HUnhsh"
shell="/bin/bash"
shellmeta="~{[*?$`'"\"
Press any key to continue [: to enter more ex commands]:

这些参数有两种赋值方法,一是,通过=赋值,二是布尔赋值。比如:
:set tabstop=8 #设置tab键宽度为8.
:set noshowmode #不显示当前模式
:set showmode #显示当前模式

2, 在vi启动是进行设置,有两种方法:
a. 在当前的用户目录,创建.exrc文件,写入你想要的命令,比如
set showmode
set tabstop=4
b. 设置环境变量EXINIT(可在.bashrc, .profile等文件中配置),比如
EXINIT='set showmode | tapstop=8'
export EXINIT

reference:
http://www.eng.hawaii.edu/Tutor/vi.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP