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

Double-save

Expand Messages
  • George Harker
    Hi folks, Still very much liking macvim. I ve got some wierd behaviour in more recent builds. To effect a save, I have to do apple-s twice. I don t have and
    Message 1 of 10 , Apr 3, 2008
      Hi folks,

      Still very much liking macvim. I've got some wierd behaviour in more
      recent builds. To effect a save, I have to do apple-s twice.

      I don't have and <D-s> mappings in my vimrc or anything and this only
      just started happening. ... I know I should be esc-w! or whatever,
      but this is one key combo that seems nicer when I'm on my mac.

      Anyone know why this might have started happening

      Cheers

      George

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_mac" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • björn
      ... I ve never seen this problem myself. Some questions: 1. Is the problem intermittent or does it happen every time you hit ? 2. Does it happen to any
      Message 2 of 10 , Apr 3, 2008
        On 03/04/2008, George Harker <georgeharker@...> wrote:
        >
        > Hi folks,
        >
        > Still very much liking macvim. I've got some wierd behaviour in more
        > recent builds. To effect a save, I have to do apple-s twice.
        >
        > I don't have and <D-s> mappings in my vimrc or anything and this only
        > just started happening. ... I know I should be esc-w! or whatever,
        > but this is one key combo that seems nicer when I'm on my mac.
        >
        > Anyone know why this might have started happening

        I've never seen this problem myself. Some questions:

        1. Is the problem intermittent or does it happen every time you hit <D-s>?
        2. Does it happen to any other menu items? (E.g. <D-g>, <D-o>, ...)
        3. Do you have to press <D-s> twice to save, or can you e.g. hit
        <D-s><Return>? (Or some other key instead of <Return>?)
        4. Does the same thing happen if you actually choose the menu item
        File->Save using the mouse?
        5. Can you reproduce this problem if you rename ~/.vimrc and ~/.gvimrc?
        6. Does it seem to matter if you start MacVim from Terminal or Finder?

        I realize these questions may be hard to answer (in particular if your
        answer to 1. is "no")...


        /Björn

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_mac" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • Ben Schmidt
        ... 7. Does it seem to matter at all what mode Vim is in at the time? Ben. ... --~--~---------~--~----~------------~-------~--~----~ You received this message
        Message 3 of 10 , Apr 3, 2008
          björn wrote:
          > On 03/04/2008, George Harker <georgeharker@...> wrote:
          >> Hi folks,
          >>
          >> Still very much liking macvim. I've got some wierd behaviour in more
          >> recent builds. To effect a save, I have to do apple-s twice.
          >>
          >> I don't have and <D-s> mappings in my vimrc or anything and this only
          >> just started happening. ... I know I should be esc-w! or whatever,
          >> but this is one key combo that seems nicer when I'm on my mac.
          >>
          >> Anyone know why this might have started happening
          >
          > I've never seen this problem myself. Some questions:
          >
          > 1. Is the problem intermittent or does it happen every time you hit <D-s>?
          > 2. Does it happen to any other menu items? (E.g. <D-g>, <D-o>, ...)
          > 3. Do you have to press <D-s> twice to save, or can you e.g. hit
          > <D-s><Return>? (Or some other key instead of <Return>?)
          > 4. Does the same thing happen if you actually choose the menu item
          > File->Save using the mouse?
          > 5. Can you reproduce this problem if you rename ~/.vimrc and ~/.gvimrc?
          > 6. Does it seem to matter if you start MacVim from Terminal or Finder?

          7. Does it seem to matter at all what mode Vim is in at the time?

          Ben.



          > I realize these questions may be hard to answer (in particular if your
          > answer to 1. is "no")...
          >
          >
          > /Björn
          >
          > >
          >

          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_mac" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • George Harker
          Hi folks, I think I ve seen what it is. The + icon in the tabs in the gui doesn t update the first time (but file is saved). The second time modifies the +
          Message 4 of 10 , Apr 4, 2008
            Hi folks,

            I think I've seen what it is.  The + icon in the tabs in the gui doesn't update the first time (but file is saved).  The second time modifies the + in the tab title (I was using about 6 tabs if it matters).  So it's not strictly the case that it's not saving.

            > 1. Is the problem intermittent or does it happen every time you hit <D-s>?


            Every time

            > 2. Does it happen to any other menu items?  (E.g. <D-g>, <D-o>, ...)

            Not that I have found

            > 3. Do you have to press <D-s> twice to save, or can you e.g. hit
            > <D-s><Return>?  (Or some other key instead of <Return>?)


            Just D-s twice. 

            > 4. Does the same thing happen if you actually choose the menu item
            > File->Save using the mouse?
            > 5. Can you reproduce this problem if you rename ~/.vimrc and ~/.gvimrc?


            I'm going to try tonight.

            > 6. Does it seem to matter if you start MacVim from Terminal or Finder


            Intersting, I'll try that.  I always launch with the mvim script from the commandline

            7. Does it seem to matter at all what mode Vim is in at the time?

            No, it seems to be the same all modes, though often I'm in insert when I do it.  I'll check.


            I think this is just a tab title update thing.


            Whils I'm on the list...

             would it be possible to attach metadata to the pasteboard (you can add stuff in addition to text that won't be pasted if not recognized) that allows paste to 'know' whether the selection was copied per line / or in a block.

            Or perhaps paste in insert mode wouldn't do the whole paste on new line thing?

            I suppose I expect it to work a bit more 'p' when you yank with a cisual selection that isn't line-based, than it does right now.  Which feels 'p' where a visual line was yanked reguardless of the previous copy mode.

            Maybe I'm being lazy, I didn't check what the key combo in play was so maybe I can remap it, but for me this isn't simply a mac-expectation thing, it's a vim expectation thing.  I use it a lot when I have to go between multiple vim windows.


            Cheers

            George

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_mac" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---

          • björn
            ... I see...can you tell me if the same thing happens if you use text-tabs ...i.e. add set go-=e in your ~/.gvimrc and see if the + disappears after
            Message 5 of 10 , Apr 4, 2008
              On 04/04/2008, George Harker <georgeharker@...> wrote:
              > I think I've seen what it is. The + icon in the tabs in the gui doesn't
              > update the first time (but file is saved). The second time modifies the +
              > in the tab title (I was using about 6 tabs if it matters). So it's not
              > strictly the case that it's not saving.

              I see...can you tell me if the same thing happens if you use
              "text-tabs"...i.e. add "set go-=e" in your ~/.gvimrc and see if the
              "+" disappears after hitting <D-s>.


              >
              > I think this is just a tab title update thing.

              Yeah, it seems that way...strange that it happens every time for you
              but never for me. :/


              > Whils I'm on the list...
              >
              > would it be possible to attach metadata to the pasteboard (you can add
              > stuff in addition to text that won't be pasted if not recognized) that
              > allows paste to 'know' whether the selection was copied per line / or in a
              > block.
              >
              > Or perhaps paste in insert mode wouldn't do the whole paste on new line
              > thing?
              >
              > I suppose I expect it to work a bit more 'p' when you yank with a cisual
              > selection that isn't line-based, than it does right now. Which feels 'p'
              > where a visual line was yanked reguardless of the previous copy mode.
              >
              > Maybe I'm being lazy, I didn't check what the key combo in play was so maybe
              > I can remap it, but for me this isn't simply a mac-expectation thing, it's a
              > vim expectation thing. I use it a lot when I have to go between multiple
              > vim windows.

              It does feel strange that <D-v> and p should work differently...I'll
              look into it. Thanks for the suggestion. Or does anybody know if
              there's a reason why they are different?

              To see the difference in action, copy these six lines:

              blah
              blah
              blah
              b
              b
              b

              Then block select the three lines of "la" and hit <D-c>, then put
              cursor on the first line with only a "b" and hit p. Then undo and do
              the same thing but use <D-v> instead of p.

              By the way, at the moment <D-v> will either paste line or
              char-wise...so it never attempts to paste block-wise (due to the way
              I've coded "paste" in gui_macvim.m)...there should be something I can
              do about that.


              /Björn

              --~--~---------~--~----~------------~-------~--~----~
              You received this message from the "vim_mac" maillist.
              For more information, visit http://www.vim.org/maillist.php
              -~----------~----~----~----~------~----~------~--~---
            • Nico Weber
              ... You can also do `:set go-=e` in a running MacVim. George, do you have guitablabel set? --~--~---------~--~----~------------~-------~--~----~ You received
              Message 6 of 10 , Apr 4, 2008
                >> I think I've seen what it is. The + icon in the tabs in the gui
                >> doesn't
                >> update the first time (but file is saved). The second time
                >> modifies the +
                >> in the tab title (I was using about 6 tabs if it matters). So it's
                >> not
                >> strictly the case that it's not saving.
                >
                > I see...can you tell me if the same thing happens if you use
                > "text-tabs"...i.e. add "set go-=e" in your ~/.gvimrc and see if the
                > "+" disappears after hitting <D-s>.

                You can also do `:set go-=e` in a running MacVim. George, do you have
                'guitablabel' set?

                --~--~---------~--~----~------------~-------~--~----~
                You received this message from the "vim_mac" maillist.
                For more information, visit http://www.vim.org/maillist.php
                -~----------~----~----~----~------~----~------~--~---
              • George Harker
                Just for information on the tab-status update thing ... pressing esc seems to update the tab. ... yes. ... yeah, it still happens. ... Either way is the same.
                Message 7 of 10 , Apr 4, 2008
                  Just for information on the tab-status update thing

                  > > > 3. Do you have to press <D-s> twice to save, or can you e.g. hit
                  > > > <D-s><Return>? (Or some other key instead of <Return>?)

                  pressing esc seems to update the tab.

                  > > > 4. Does the same thing happen if you actually choose the menu item
                  > > > File->Save using the mouse?

                  yes.

                  > > > 5. Can you reproduce this problem if you rename ~/.vimrc and ~/.gvimrc?

                  yeah, it still happens.

                  > > > 6. Does it seem to matter if you start MacVim from Terminal or Finder

                  Either way is the same.

                  > > 7. Does it seem to matter at all what mode Vim is in at the time?

                  Actually Yes - it happens in insert mode only. I'd be happy for D-s
                  to do an esc maybe?

                  --~--~---------~--~----~------------~-------~--~----~
                  You received this message from the "vim_mac" maillist.
                  For more information, visit http://www.vim.org/maillist.php
                  -~----------~----~----~----~------~----~------~--~---
                • George Harker
                  Hi folks, ... Yes, I use gui tabs (and that s in my vimrc). Non-gui tabs (text tabs) behave the same, so the bug might be a thing in vim... or the way a save
                  Message 8 of 10 , Apr 4, 2008
                    Hi folks,

                    > I see...can you tell me if the same thing happens if you use
                    > "text-tabs"...i.e. add "set go-=e" in your ~/.gvimrc and see if the
                    > "+" disappears after hitting <D-s>.

                    Yes, I use gui tabs (and that's in my vimrc). Non-gui tabs (text
                    tabs) behave the same, so the bug might be a thing in vim... or the
                    way a save is invoked in insert mode

                    > Yeah, it seems that way...strange that it happens every time for you
                    > but never for me. :/

                    If I have gui or non gui tabs up, go insert mode with 'a', type a char
                    and hit <D-s> it's totally repeatable. An esc updates (but additional
                    insert-mode keys do not)


                    > It does feel strange that <D-v> and p should work differently...I'll
                    > look into it. Thanks for the suggestion. Or does anybody know if
                    > there's a reason why they are different?
                    >
                    > To see the difference in action, copy these six lines:
                    >
                    > blah
                    > blah
                    > blah
                    > b
                    > b
                    > b
                    >
                    > Then block select the three lines of "la" and hit <D-c>, then put
                    > cursor on the first line with only a "b" and hit p. Then undo and do
                    > the same thing but use <D-v> instead of p.
                    >
                    > By the way, at the moment <D-v> will either paste line or
                    > char-wise...so it never attempts to paste block-wise (due to the way
                    > I've coded "paste" in gui_macvim.m)...there should be something I can
                    > do about that.


                    You can also see the line-wise effect using a line-select of the last
                    blah and first b, then <D-c>. Position cursor on first b. The key p
                    will insert after the line as expected, but <D-v> inserts before...
                    wierd.

                    Hope that helps

                    Cheers

                    George

                    --~--~---------~--~----~------------~-------~--~----~
                    You received this message from the "vim_mac" maillist.
                    For more information, visit http://www.vim.org/maillist.php
                    -~----------~----~----~----~------~----~------~--~---
                  • björn
                    ... Ok, that s most certainly 100% reproducible! I will look into it. Thanks for the report, Björn --~--~---------~--~----~------------~-------~--~----~ You
                    Message 9 of 10 , Apr 4, 2008
                      On 04/04/2008, George Harker <georgeharker@...> wrote:
                      >
                      > > I see...can you tell me if the same thing happens if you use
                      > > "text-tabs"...i.e. add "set go-=e" in your ~/.gvimrc and see if the
                      > > "+" disappears after hitting <D-s>.
                      >
                      > Yes, I use gui tabs (and that's in my vimrc). Non-gui tabs (text
                      > tabs) behave the same, so the bug might be a thing in vim... or the
                      > way a save is invoked in insert mode
                      >
                      >
                      > > Yeah, it seems that way...strange that it happens every time for you
                      > > but never for me. :/
                      >
                      >
                      > If I have gui or non gui tabs up, go insert mode with 'a', type a char
                      > and hit <D-s> it's totally repeatable. An esc updates (but additional
                      > insert-mode keys do not)

                      Ok, that's most certainly 100% reproducible! I will look into it.

                      Thanks for the report,
                      Björn

                      --~--~---------~--~----~------------~-------~--~----~
                      You received this message from the "vim_mac" maillist.
                      For more information, visit http://www.vim.org/maillist.php
                      -~----------~----~----~----~------~----~------~--~---
                    • björn
                      ... I ve fixed copy/paste so that it respects block-wise selections (the fix is in the public repo). However, do note that Edit- Paste is bound to +gP and
                      Message 10 of 10 , Apr 5, 2008
                        On 04/04/2008, George Harker <georgeharker@...> wrote:
                        >
                        > > It does feel strange that <D-v> and p should work differently...I'll
                        > > look into it. Thanks for the suggestion. Or does anybody know if
                        > > there's a reason why they are different?
                        > >
                        > > To see the difference in action, copy these six lines:
                        > >
                        > > blah
                        > > blah
                        > > blah
                        > > b
                        > > b
                        > > b
                        > >
                        > > Then block select the three lines of "la" and hit <D-c>, then put
                        > > cursor on the first line with only a "b" and hit p. Then undo and do
                        > > the same thing but use <D-v> instead of p.
                        > >
                        > > By the way, at the moment <D-v> will either paste line or
                        > > char-wise...so it never attempts to paste block-wise (due to the way
                        > > I've coded "paste" in gui_macvim.m)...there should be something I can
                        > > do about that.
                        >
                        > You can also see the line-wise effect using a line-select of the last
                        > blah and first b, then <D-c>. Position cursor on first b. The key p
                        > will insert after the line as expected, but <D-v> inserts before...
                        > wierd.

                        I've fixed copy/paste so that it respects block-wise selections (the
                        fix is in the public repo). However, do note that Edit->Paste is
                        bound to "+gP" and _not_ "+gp" as one might expect. This is what
                        causes <D-v> to behave like "P" instead of "p". If you first enter
                        insert mode and then hit <D-v> then this problem goes away since the
                        insert mode cursor "sits between" characters (as opposed to the normal
                        mode cursor which "covers" one char).

                        /Björn

                        --~--~---------~--~----~------------~-------~--~----~
                        You received this message from the "vim_mac" maillist.
                        For more information, visit http://www.vim.org/maillist.php
                        -~----------~----~----~----~------~----~------~--~---
                      Your message has been successfully submitted and would be delivered to recipients shortly.