2014-02-23 299 views
8

安装在我的gentoo linux中的gvim无法正确显示下划线(_)。键入后,屏幕将显示一个空格,与按空格键后的输出相同。但是,仍然可以通过搜索下划线(例如:/ _)来区分下划线和空格。gvim将下划线显示为空格

有趣的是,这个问题并不在vim中,因为下划线和空白都可以正确显示。

这里有GVIM和vim的版本信息:

gvim --version 
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 20 2014 12:49:32) 
Included patches: 1-762 
Modified by Gentoo-7.3.762 
Compiled by [email protected] 
Huge version with GTK2-GNOME GUI. Features included (+) or not (-): 
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments 
+conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui +diff 
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi 
+file_in_path +find_in_path +float +folding -footer +fork() +gettext 
-hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall 
+linebreak +lispindent +listcmds +localmap -lua +menu +mksession +modify_fname 
+mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm 
+mouse_sgr -mouse_sysmouse +mouse_urxvt +mouse_xterm +multi_byte +multi_lang 
-mzscheme -netbeans_intg +path_extra -perl +persistent_undo +postscript 
+printer +profile +python -python3 +quickfix +reltime +rightleft -ruby 
+scrollbind +signs +smartindent -sniff +startuptime +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 
    system vimrc file: "/etc/vim/vimrc" 
    user vimrc file: "$HOME/.vimrc" 
     user exrc file: "$HOME/.exrc" 
    system gvimrc file: "/etc/vim/gvimrc" 
    user gvimrc file: "$HOME/.gvimrc" 
    system menu file: "$VIMRUNTIME/menu.vim" 
    fall-back for $VIM: "/usr/share/vim" 
Compilation: x86_64-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -D_REENTRANT -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/gnome-keyring-1 -I/usr/include/libbonoboui-2.0 -I/usr/include/libxml2 -I/usr/include/libgnome-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/orbit-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gail-1.0 -I/usr/include/libart-2.0 -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/gnome-vfs-2.0 -I/usr/lib64/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -O2 -pipe -march=native -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1  
Linking: x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -L/usr/local/lib -Wl,--as-needed -o gvim -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lgnomecanvas-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgdk_pixbuf-2.0 -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lelf -lacl -lattr -lgpm -ldl  -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic
 
vim --version 
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 19 2014 22:06:12) 
Included patches: 1-762 
Modified by Gentoo-7.3.762 
Compiled by [email protected] 
Huge version without GUI. Features included (+) or not (-): 
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset 
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info 
+conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con +diff 
-dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_ 
+find_in_path +float +folding -footer +fork() +gettext -hangul_input 
+insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispi 
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mous 
+mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm +mouse_sgr -mous 
+mouse_urxvt +mouse_xterm +multi_byte +multi_lang -mzscheme +netbean 
+path_extra -perl +persistent_undo +postscript +printer +profile +py 
-python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +sma 
-sniff +startuptime +statusline -sun_workshop +syntax +tag_binary 
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobj 
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextr 
+vreplace +wildignore +wildmenu +windows +writebackup +X11 +xfontset 
+xsmp_interact +xterm_clipboard -xterm_save 
    system vimrc file: "/etc/vim/vimrc" 
    user vimrc file: "$HOME/.vimrc" 
     user exrc file: "$HOME/.exrc" 
    fall-back for $VIM: "/usr/share/vim" 
Compilation: x86_64-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H 
Linking: x86_64-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -L/usr/lolICE -lm -lncurses -lelf -lnsl -lacl -lattr -lgpm -ldl  -L/usr/xport-dynamic  
+0

初步猜测会是你的colorscheme设置不正确。确保在vimrc中没有'set background = ...',这可能会覆盖colorscheme中设置的设置。或者尝试通过使用诸如http://www.vim.org/scripts/script.php?script_id=383 – FDinoff

+0

这样的插件找出哪些高亮组_属于它。这绝对不是由于改变其他背景的背景所致仍然无法正确显示下划线。 –

回答

23

可以通过压扁线间距引起的。尝试运行:设置linespace = 5增加行间距

+0

虽然仍然非常微弱 – rfabbri