分页: 1 / 1

vim里怎样高亮显示匹配的括号

发表于 : 2008-07-24 17:12
xiaozhe2000
比如说两个大括号{ }
在正常模式下,光标移到第一个大括号时,自动高亮第二个大括号。

发表于 : 2008-07-25 12:21
kofshower
设置showmatch

发表于 : 2008-07-25 15:26
xiaozhe2000
设置showmatch只能是在编辑模式下,敲入后一个},会高亮一下前面匹配的{ 。
我说的意思是在正常模式下,光标放在{ 上就能高亮匹配的 } 。

发表于 : 2008-07-25 15:41
solcomo
只要开了高亮就行吧
syntax enable

发表于 : 2008-07-25 15:49
kofshower
回头试一试,现在这个机子上居然没有shift键,囗囗囗囗

发表于 : 2008-07-25 15:51
xiaozhe2000
syntax enable 只是语法加亮。
我这里试了一下,加了syntax enable 也不能高亮匹配的括号。

发表于 : 2008-07-25 15:55
kofshower
xiaozhe2000 写了:syntax enable 只是语法加亮。
我这里试了一下,加了syntax enable 也不能高亮匹配的括号。
我之前是用百分号,估计这种高亮要自动的话得自己写脚本函数了。

发表于 : 2008-07-25 15:58
solcomo
....试了一下
我这不用.vimrc都可以

是不是vim版本的问题啊

发表于 : 2008-07-25 16:02
xiaozhe2000
请问楼上用的是哪个版本,我这个是有点老,6.3

发表于 : 2008-07-25 16:08
solcomo
User:~>vim --version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun 26 2008 12:58:25)

发表于 : 2008-07-25 16:57
xiaozhe2000
嗯,刚下了一个7.1版本的,已经实现这个功能了,谢谢楼上几位 :)

发表于 : 2008-07-25 19:11
kofshower
昏,都用7.1了~
我编译去

发表于 : 2008-07-27 11:27
kofshower
solcomo 写了:User:~>vim --version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun 26 2008 12:58:25)
archlinux?我感觉系统带的vim是这个:
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan 31 2008 12:00:11)
Patch: 1-138
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
+netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile
+python +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact
+xterm_clipboard -xterm_save

发表于 : 2008-07-27 11:32
solcomo
kofshower 写了:
solcomo 写了:User:~>vim --version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jun 26 2008 12:58:25)
archlinux?我感觉系统带的vim是这个:
VIM - Vi IMproved 7.1 (2007 May 12, compiled Jan 31 2008 12:00:11)
Patch: 1-138
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
+keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
+netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile
+python +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact
+xterm_clipboard -xterm_save
...换8.10源升级了几个软件