Wednesday, January 22, 2014

Re: Avoid switching files with ctrl-o

On Wednesday, January 22, 2014 8:00:09 PM UTC-5, Gary Johnson wrote:
>On 2014-01-22, Paul wrote:
>> I like navigating through old cursor positions with ctrl-o and
>> ctrl-i. However, I don't necessarily like the way it switches
>> files sometimes. I end up writing the current file before
>> switching files, and when I go back to the original file, Undo no
>> longer works. Is there a way to prevent ctrl-o from switching
>> files? How about preventing this only when ctrl-o is invoked from
>> a macro such as one defined using one of the :map variations?
>
> It sounds like the problem may not be that Ctrl-O switches files but
> that switching files loses your undo history. If that's the case,
> then see
>
> :help undo-persistence

Actually, I want to avoid switching files as well. That's the main problem for me, the undo is just icing on the problem. Is that possible (avoiding the file switch, preferrably selectively, such as in a macro)?

--
--
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

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment