On Jan 26, 11:00 pm, Jabez <[email protected]> wrote:
>
> I mapped "Shift-Tab" to ":tabnext" for cycling between tabs. When i'm
> editing one file i switched to another file which is in another tab for
> referance. I noticed that cursor in my first file moved one coloumn behind
> its position from where i left before switching. i thought its my mistake.
> But i noticed it several times, its not staying in the same position where
> it was left. Its very annoying that i have to put the cursor back to the
> original position to edit that sentence again. Is there any way to avoid
> this problem??
>
> PS: I'm in Insert mode when this happened.
>
What exact command did you use to create this mapping? It could be a
result of using "i" to re-enter insert mode, if this is what you are
doing. To see this effect, just edit a buffer with some text, position
the cursor somewhere near the end of a long line, and type
i<esc>i<esc>i<esc>... repeatedly to see the cursor moving backwards.
If this is your problem, try using <C-O> or <C-\><C-O> in your mapping
instead of <esc>...<i>. See :help i_CTRL-O and immediately below.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---