One of the best vim features is (in my case was) multilevel undo.
I'm compile new vim and I lost multilevel undo feature.
When I press second times 'u' it is not next undo but redo :-(
:version
VIM - Vi IMproved 5.3 (1998 Aug 30, compiled Sep 17 1998 10:45:53)
Compiled with (+) or without (-):
+autocmd +browse ++builtin_terms +cindent +cscope +dialog_con_gui +digraphs
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path -filetype
+find_in_path +fork() +GUI_Motif +insert_expand +langmap +lispindent
+modify_fname +mouse +mouse_dec +mouse_netterm +mouse_xterm +multi_byte -perl
+quickfix -python +rightleft +showcmd +smartindent -sniff +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +textobjects +user-commands
+viminfo +wildignore +writebackup -xterm_save +X11
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: "$VIM/menu.vim"
default for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DUSE_GUI_MOTIF -I/usr/dt/incl
ude -g -O2 -Wall -Wshadow -I/usr/openwin/include
Linking: gcc -o vim -L/lib -R /lib -L/usr/openwin/lib -R/usr/openwin/lib -lXe
xt -lXm -lXt -lX11 -ltermlib
so, where is a problem ?
Keso
> One of the best vim features is (in my case was) multilevel undo.
> I'm compile new vim and I lost multilevel undo feature.
> When I press second times 'u' it is not next undo but redo :-(
[--- snip ---]
> so, where is a problem ?
> Keso
When you fire up vim, you apparently have 'compatible' set. This will
happen if you don't have a vimrc. If a vimrc is found, 'compatible' is
unset and undo is multilevel. Older versions of vim (4.6, iirc,
pssibly some of the 5.0 alphas aswell) defaulted to 'nocompatible', so
this may be the reason.
Either creating a vimrc or start vim with the -N shuold correct this.
If you prefer compatibility in all other respects, add the following
lines in a vimrc:
set compatible
set cpooptions-=u
where cpooptions-=u removes u from the 'cpooptions' option.
Peppe
--
Preben Guldberg __/-\__ "I like big fat men like you. When they
c92...@student.dtu.dk (o o) fall they make more noise. Sometimes
----------------------oOOo (_) oOOo they never get up." --Il brutto
http://www.student.dtu.dk/~c928400/ --_Il buono, il brutto, il cattivo_
> When you fire up vim, you apparently have 'compatible' set. This will
> happen if you don't have a vimrc. If a vimrc is found, 'compatible' is
> unset and undo is multilevel. Older versions of vim (4.6, iirc,
On my Debian installaion of vim, "compatible" is set even if you have
a .vimrc but call vim with the -u flag specifying a different config file.
I was wondering why I lost my multiple undo when using -u.
I stuck "set nocompatible" in my alternate .rc file and all is well
again.
Thanks for the lead!
--
L.V.X.
work http://www.mousetrap.net/ CGI, HTML, Instruction
play http://www.mousetrap.net/~mouse/ the Great Work, opinions
"This thinker needs nobody to refute him: for that he suffices
himself." Mixed Opinions and Aphorisms. Friedrich Nietzsche,
1879.
> > When you fire up vim, you apparently have 'compatible' set. This will
> > happen if you don't have a vimrc. If a vimrc is found, 'compatible' is
> > unset and undo is multilevel. Older versions of vim (4.6, iirc,
> On my Debian installaion of vim, "compatible" is set even if you have
> a .vimrc but call vim with the -u flag specifying a different config file.
This is special with the -u flag. From the docs (":h -u"):
*-u*
-u {vimrc} The file "vimrc" is read for initializations. Other
[--- snip ---]
Using the "-u" argument also means that the 'compatible'
option will be on by default. This can have unexepected side
effects. See |'compatible'|.
{not in Vi}
> I was wondering why I lost my multiple undo when using -u.
> I stuck "set nocompatible" in my alternate .rc file and all is well
> again.
Setting 'nocompatible' is always a good bet :-)
Peppe
--
`All the higher life forms __/-\__ Preben Guldberg
scythed away, just like that.' (o o) c92...@student.dtu.dk
`Terrible.' oOOo (_) oOOo---------------------
`Nothing but dust and fundamentalists.' --Pratchet & Gaiman, _Good Omens_