Loading ...
Sorry, an error occurred while loading the content.

Re: How to remember end of line when quitting/reopening in insert mode

Expand Messages
  • Jean Johner
    Hi Andy, One (last?) suggestion to improve lastpos.vim 1) Consider a .vimrc containing the following 2 lines: set insertmode imap :bprevious
    Message 1 of 37 , Apr 1 12:54 AM
    • 0 Attachment
      Hi Andy,
      One (last?) suggestion to improve lastpos.vim

      1) Consider a .vimrc containing the following 2 lines:
      set insertmode
      imap <F8> <C-\><C-O>:bprevious<CR>

      Please do the following:
      gvim file1
      CTRL-O :e file2
      put the cursor at the end of line 10
      <F8>
      put the cursor at the end of line 10 (in file1)
      Use <F8> several times
      You see that the end of lines are remembered (Good)

      2) Just add "set hidden" in the .vimrc
      set insertmode
      set hidden
      imap <F8> <C-\><C-O>:bprevious<CR>

      Please do the following:
      gvim file1
      CTRL-O :e file2
      put the cursor at the end of line 10
      <F8>
      put the cursor at the end of line 10 (in file1)
      Use <F8> several times
      You see that only line numbers are remembered. The cursor is always on
      column 1.

      Can you improve that?

      Hint: Using vimrc_example.vim as .vimrc (without lastpos.vim), the
      same problem occurs in normal mode. The solution is to replace
      BufReadPost with BufWinEnter in vimrc_example.vim.

      Best regards
      Jean Johner

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

      To unsubscribe, reply using "remove me" as the subject.
    • JOHNER Jean 066030
      ... Please find attached Andy s new miracle plugin. Works with either set insertmode or startinsert in .vimrc. Works when switching between buffers (with
      Message 37 of 37 , Apr 9 12:38 AM
      • 0 Attachment
        On April 8, Andy Wokula wrote:

        > See attachment for a new approach (lastpos v0.6).
        > (doesn't need announcement for Insert mode)

        Please find attached Andy's new miracle plugin.

        Works with either "set insertmode" or "startinsert" in .vimrc.
        Works when switching between buffers (with <C-\><C-O>:bp<CR>).
        Works when leaving insert mode.
        No workarounds required.
        A must!

        Best regards
        Jean Johner

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

        To unsubscribe, reply using "remove me" as the subject.
      Your message has been successfully submitted and would be delivered to recipients shortly.