gvim window size narrower than normal

已查看 28 次
跳至第一个未读帖子

alick

未读,
2011年12月6日 00:27:552011/12/6
收件人 vim...@googlegroups.com
Hi,

I use Fedora 16 and gvim shipped from the software repo.
I experience a strange and annoying problem:

When I am in gnome-terminal(80x24) and type gvim to start GVim(GTK),
the window lines is less than normal(24 lines). When cmd line
height(ch) is 2, lines=20; when ch is 1, lines=19.

I also try 'gvim -u NONE -U NONE', the problem still exists.

I also test as a user with no personal .vimrc, .gvimrc, .vim/,
the problem is still there.

I searched the web and found a similar case [1], but the solution
there (au GUIEnter * set lines=BLABLA) doesn't work for me.

However, when I start gvim with 'gvim -V10' (where 10 can be
changed to 8, 5, 1, or other), lines are 24. When starting with
'gvim -V10vimlog', lines are 20 or 19 again.

When using GUI double-click, the lines value is *sometimes* incorrect.
I find the Exec line in fedora-gvim.desktop says 'gvim -f %F'.
While in terminal, lines value is always wrong (unless with -V option).

Does someone have the similar problem? Hope someone can give hints to
solve it.

[1]
http://objectmix.com/editors/148769-%5Bgvim%5Dwindow-size-not-what-i-set-gvimrc-vimrc.html

I attach the gvim version info below.
$ gvim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 21 2011 09:33:50)
包含补丁: 1-315
修改者 <bugz...@redhat.com>
编译者 <bugz...@redhat.com>
巨型版本 带 GTK2 图形界面。
可使用(+)与不可使用(-)的功能:
+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_sysmouse +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
系统 vimrc 文件: "/etc/vimrc"
用户 vimrc 文件: "$HOME/.vimrc"
用户 exrc 文件: "$HOME/.exrc"
系统 gvimrc 文件: "/etc/gvimrc"
用户 gvimrc 文件: "$HOME/.gvimrc"
系统菜单文件: "$VIMRUNTIME/menu.vim"
$VIM 预设值: "/etc"
$VIMRUNTIME 预设值: "/usr/share/vim/vim73"
编译方式: 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/atk-1.0 -I/usr/include/cairo
-I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include
-I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12
-I/usr/local/include -O2 -g -pipe -Wall -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=1
链接方式: gcc -L. -Wl,-z,relro -rdynamic -Wl,-export-dynamic
-Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE -Wl,-z,relro
-L/usr/local/lib -Wl,--as-needed -o vim -pthread -lgtk-x11-2.0
-lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0
-lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig
-lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lSM -lICE
-lXpm -lXt -lX11 -lSM -lICE -lm -lnsl -lselinux -lncurses -lacl -lattr
-lgpm -ldl -Wl,--enable-new-dtags -Wl,-rpath,/usr/lib64/perl5/CORE
-fstack-protector -L/usr/lib64/perl5/CORE -lperl -lresolv -lnsl -ldl
-lm -lcrypt -lutil -lpthread -lc -L/usr/lib64/python2.7/config
-lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -lruby
-lpthread -lrt -ldl -lcrypt -lm

--
alick
Fedora 16 (Verne) user
https://fedoraproject.org/wiki/User:Alick

John Little

未读,
2011年12月7日 04:44:042011/12/7
收件人 vim_use
On Dec 6, 6:27 pm, alick <alick9...@gmail.com> wrote:
>
> When I am in gnome-terminal(80x24) and type gvim to start GVim(GTK),
> the window lines is less than normal(24 lines). ....

Just a few ideas:

- Maybe there's an X resource affecting gvim. You might check the
output of xrdb -query, maybe grep -i for vim.
- GTK is a murky world, maybe there's a gtkrc file somewhere
- gvim honours a -geometry argument. I use a bash alias

alias v='gvim -geometry 80x60'

You could use this as a workaround.

Regards, John
-

alick

未读,
2011年12月8日 00:50:172011/12/8
收件人 vim...@googlegroups.com

Thank you John. But I still don't get it right (in Gnome Shell).
Here's some additional info:

* xrdb -query gives no info about vim
* 'gvim -geom 80x24' works just like 'gvim', randomly incorrect size.

However, I found no problem while using Fvwm (no gnome-session) as WM.
gvim behaves always right (at least, so far).

alick

未读,
2011年12月12日 21:40:472011/12/12
收件人 vim...@googlegroups.com
I've been using Fvwm these days. No such strange behavior happens under
Fvwm. Also, I try to use GNOME fallback mode a bit, and also no strange
there. Strange things just occur with GNOME Shell. Currently little
time and skill to dig into this issue :(

To sum up, I found a walkaround: just change a WM/DE. (Well, this is
also strange, huh?)

回复全部
回复作者
转发
0 个新帖子