Tuesday, March 2, 2010

vim glitch with opening new files

There's one very strange behavior that I observe both in vim and gvim. I do

vim new_file.c

This opens empty file for editing.

Now in vim I do

:new new_file.h

Instead of getting buffer with another empty file, I get the screen
split and new_file.c is for edit in both buffers. This is not all.
If I do some modifications in the new buffer and then close it without
saving, then it'll get closed. Now again I try to do

:new new_file.h

and this time I get the error

E37: No write since last change (add ! to override)

Opening existing files works correctly. Is this a glitch of my version
only, or someone else has seen it as well?

Here's the output of :version

:version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Nov 4 2009 15:58:37)
Included patches: 1-168
Compiled by andrei@vandal
Normal version with GTK2 GUI. Features included (+) or not (-):
-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 +float +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_sysmouse +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
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-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/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/inclu
de/libpng12 -O2 -march=athlon64 -pipe -I/usr/include64
Linking: gcc -L/usr/lib64 -L/usr/local/lib -o vim -lgtk-x11-2.0
-lgdk-x11-2.0 -latk-1.0 -lgio-2
.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo
-lpango-1.0 -lfreetype -lfontconfig -lgo
bject-2.0 -lgmodule-2.0 -lglib-2.0 -lXt -lm -lncurses -lacl -lgpm
P

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments: