On Mon, Sep 25, 2006 at 12:04:45PM -0300, Matias Grana wrote: > On Tue, Sep 19, 2006 at 08:36:13AM -0400, Benji Fisher wrote: > > On Mon, Sep 18, 2006 at 04:47:14PM -0300, Matias Grana wrote: > > [snip] > > > > > > -------------------- excerpt of .vimrc ----------------- > > > augroup acentos > > > autocmd! > > > autocmd BufReadPost *.tex call Acentua() > > > autocmd BufWritePre *.tex exe "normal mm" | call Desacentua() > > > autocmd BufWritePost *.tex call Acentua() | exe "normal `m" > > > augroup END > > [snip] > > > -------------------- end of excerpt -------------------- > > > > > [snip] > > > So far, so good. Now I have two problems: > > > > > > 1) the substitutions in the functions Acentua and Desacentua are saved > > > as changings. So undo commands mess with them. I'd like those changings > > > not to be seen by undo/redo commands. Is it possible? > > > > I have not tried using this new vim-7 feature, but you might try > > experimenting with :undojoin . > > > > :help :undojoin > > Seems to work, except for the fact that I can't do an :undojoin after an > undo. So I resort in the script to > a) do a dummy change > b) :undojoin > c) change the things I want to change > d) save the file > e) undo > > Is it possible to do it without the dummy change?
As I said, I have not tried using :undojoin yet. At this point, your guess is better than mine. HTH --Benji Fisher