Hi, bootleq wrote: > > 2011/9/5 James Vega <[email protected] <mailto:[email protected]>> >> >> On Sun, Sep 04, 2011 at 10:47:53AM +0800, bootleq wrote: >> > About the automatically added jump: >> > It' reasonable when undoing a single change. >> > But if we do many changes at one function, one undo block, >> > we might want to keep the cursor unchanged after undo. >> >> You can use the :keepjumps command to perform an action without altering >> the jump list. >> >> -- >> James >> GPG Key: 1024D/61326D40 2003-09-02 James Vega <[email protected] >> <mailto:[email protected]>> > > Yes, thanks, but in this case, with > 1) :keepjumps | call setline(1, 'bar') > 2) :keepjumps | undo > it still jump to line 1.
don't use bars after :keepjumps. :keepjumps takes a command as argument. Putting the bars there told Vim to execute :keepjumps without arguments (which is a no-op), and than to execute :call and :undo, respectively. Regards, Jürgen -- Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us. (Calvin) -- You received this message from the "vim_dev" 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
