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

MacVim forces last pattern search using vim flags

Expand Messages
  • anilg
    I ve got a problem with MacVim that I m hoping can be fixed. I find that MacVim forces certain flags to be used which are mostly inconvenient. When using
    Message 1 of 7 , Jul 18, 2013
    • 0 Attachment
      I've got a problem with MacVim that I'm hoping can be fixed.
      I find that MacVim forces certain flags to be used which are mostly inconvenient.

      When using /usr/local/bin/mvim to start MacVim directly from the command line benign flags are used and can be adjusted in mvim anyway:

      $ ps aux | grep vim
      /usr/bin/grep -i vim
      /Applications/MacVim.app/Contents/MacOS/MacVim -MMNoWindow yes
      /Applications/MacVim.app/Contents/MacOS/Vim -f -g test.txt

      When double clicking a text file in the Mac Finder MacVim uses two flags which force particular behaviour.

      The '-o' flag is supposed to open multiple files in separate windows.
      I don't want this behaviour as I prefer splits, but actual behaviour varies for unknown reasons.

      The '+/' initates a search on the last pattern used.
      This is consistent but again elicts unwanted behaviour.

      When the last pattern matches the file comes up highlighted due to my settings.
      I have to type :nohl to view the file properly.
      Often this is the entire text that is highlighted in red.

      When the pattern does not match it still causes a problem.
      Vim responds "error detected" and "pattern not found".
      This requires a confirmation every time before I start editing.

      $ ps aux | grep vim
      /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_3105526
      /usr/bin/grep -i vim
      /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -o /Volumes/Data/Users/user/Desktop/test.txt

      See the plus slash "+/" and the option "-o"? That's the culprits right there!

      Most of the time I'm editing a different file. Last pattern search is unwanted and unlikely to match. When can I edit out these flags?

      --
      --
      You received this message from the "vim_mac" 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_mac" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • anilg
      ... In case anyone got the wrong idea; what I meant was: WHERE can I edit the flags that MacVim uses to call vim. -- -- You received this message from the
      Message 2 of 7 , Jul 24, 2013
      • 0 Attachment
        > $ ps aux | grep vim
        > /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_3105526
        > /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -o test.txt
        >
        > See the plus slash "+/" and the option "-o"? That's the culprits right there!
        >
        > Most of the time I'm editing a different file.
        > Last pattern search is unwanted and unlikely to match.
        > When can I edit out these flags?

        In case anyone got the wrong idea; what I meant was:

        WHERE can I edit the flags that MacVim uses to call vim.

        --
        --
        You received this message from the "vim_mac" 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_mac" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • björn
        ... The -o is most likely because you ve gone into the preferences and set it to open files with a split for each file . I thought that was what you
        Message 3 of 7 , Jul 25, 2013
        • 0 Attachment
          On Wed, Jul 24, 2013 at 1:59 PM, anilg wrote:
          > $ ps aux | grep vim
          > /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_3105526
          > /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -o test.txt
          >
          > See the plus slash "+/" and the option "-o"? That's the culprits right there!
          >
          > Most of the time I'm editing a different file.
          > Last pattern search is unwanted and unlikely to match.
          > When can I edit out these flags?

          In case anyone got the wrong idea; what I meant was:

          WHERE can I edit the flags that MacVim uses to call vim.

          The "-o" is most likely because you've gone into the preferences and set it to open files "with a split for each file".  I thought that was what you wanted?  It does not open in separate windows as you wrote earlier.  You can get rid of the "-o" flag by choosing "and set the arglist" instead.

          The "+/" should not be there.  I don't know where it is coming from -- are you using the latest snapshot?  If not, try updating.  Also, go through the Troubleshooting guide [1].

          Björn

          --
          --
          You received this message from the "vim_mac" 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_mac" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
           
           
        • anilg
          ... Thanks for your advice, Bjorn. I ve gone through full wiki/Troubleshooting again. I removed *everything* including unrelated files and did defaults delete.
          Message 4 of 7 , Aug 19 4:04 PM
          • 0 Attachment
            On Friday, 26 July 2013 05:52:01 UTC+10, björn wrote:
            > On Wed, Jul 24, 2013 at 1:59 PM, anilg wrote:
            > > $ ps aux | grep vim
            > > /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_3105526
            > > /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -o test.txt
            > > See the plus slash "+/" and the option "-o"? That's the culprits right there!
            > > Last pattern search is unwanted and unlikely to match.
            > WHERE can I edit the flags that MacVim uses to call vim.

            > The "-o" is most likely because you've gone into the preferences and set it to open files "with a split for each file".  I thought that was what you wanted?  It does not open in separate windows as you wrote earlier.  You can get rid of the "-o" flag by choosing "and set the arglist" instead.
            > The "+/" should not be there.  I don't know where it is coming from -- are you using the latest snapshot?  If not, try updating.  Also, go through the Troubleshooting guide [1].
            > Björn
            > [1] https://github.com/b4winckler/macvim/wiki/Troubleshooting

            Thanks for your advice, Bjorn.
            I've gone through full wiki/Troubleshooting again.
            I removed *everything* including unrelated files and did defaults delete.
            I'm on 7.3. Attempt to update gives "You're up to date!".
            Still the "+/" is there - searching for last pattern when no-one asked it to.
            It appears to come directly from MacVim.app?
            I think I may try to re-install MacVim.

            $ ps -ax | grep vim
            /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_426088
            /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -p /path/to/file/example.txt



            --
            --
            You received this message from the "vim_mac" 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_mac" group.
            To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
            For more options, visit https://groups.google.com/groups/opt_out.
          • anilg
            ... I tried to find stable MacVim 7.3 but the website has PHP errors. I got snapshot 70 of 7.4 for OS X 10.8 from Github (I have 10.8.3) but it doesn t respect
            Message 5 of 7 , Aug 19 11:27 PM
            • 0 Attachment
              > On Friday, 26 July 2013 05:52:01 UTC+10, björn wrote:
              > > The "+/" should not be there.
              > > [1] https://github.com/b4winckler/macvim/wiki/Troubleshooting

              On Tuesday, 20 August 2013 09:04:11 UTC+10, anilg wrote:
              > Thanks for your advice, Bjorn.
              > I've gone through full wiki/Troubleshooting again.
              > I removed *everything* including unrelated files and did defaults delete.
              > I'm on 7.3. Attempt to update gives "You're up to date!".
              > Still the "+/" is there - searching for last pattern when no-one asked it to.
              > It appears to come directly from MacVim.app?
              > I think I may try to re-install MacVim.
              >
              > $ ps -ax | grep vim
              > /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_426088
              > /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -p /path/to/file/example.txt

              I tried to find stable MacVim 7.3 but the website has PHP errors.
              I got snapshot 70 of 7.4 for OS X 10.8 from Github (I have 10.8.3) but it doesn't respect my ~/.vimrc?
              I still have MacVim-7_3-66.tbz but I seem to remember there were problems so I didn't use it.
              I still have MacVim-7_3-53.tbz which is what I've got currently.
              I might try to re-install that again.

              --
              --
              You received this message from the "vim_mac" 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_mac" group.
              To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
              For more options, visit https://groups.google.com/groups/opt_out.
            • björn
              ... You should be running snapshot 70 -- if you have problems with .vimrc then start a new thread and ask for help, but it should work. Snap 70 fixes the
              Message 6 of 7 , Aug 20 12:46 AM
              • 0 Attachment
                On Tue, Aug 20, 2013 at 8:27 AM, anilg wrote:
                > On Friday, 26 July 2013 05:52:01 UTC+10, björn wrote:
                > > The "+/" should not be there.
                > > [1] https://github.com/b4winckler/macvim/wiki/Troubleshooting

                On Tuesday, 20 August 2013 09:04:11 UTC+10, anilg  wrote:
                > Thanks for your advice, Bjorn.
                > I've gone through full wiki/Troubleshooting again.
                > I removed *everything* including unrelated files and did defaults delete.
                > I'm on 7.3. Attempt to update gives "You're up to date!".
                > Still the "+/" is there - searching for last pattern when no-one asked it to.
                > It appears to come directly from MacVim.app?
                > I think I may try to re-install MacVim.
                >
                > $ ps -ax | grep vim
                > /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_426088
                > /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -p /path/to/file/example.txt

                I tried to find stable MacVim 7.3 but the website has PHP errors.
                I got snapshot 70 of 7.4 for OS X 10.8 from Github (I have 10.8.3) but it doesn't respect my ~/.vimrc?
                I still have MacVim-7_3-66.tbz but I seem to remember there were problems so I didn't use it.
                I still have MacVim-7_3-53.tbz which is what I've got currently.
                I might try to re-install that again.

                You should be running snapshot 70 -- if you have problems with .vimrc then start a new thread and ask for help, but it should work.  Snap 70 fixes the problem of 53 where using "+" to open Spotlight searches caused a warning message (but the search term will still be highlighted if there is a match).

                By the way, everything indicates that you are running some sort of program (something like a SIMBL plugin perhaps?) that causes Spotlight searches to be included in the "open" event that is sent when you open files from Finder.  Normally, this only happens when you open a file by typing in the Spotlight search bar and opening a file (in which case MacVim highlights the search term) -- this should not happen when you double click a file in Finder (and indeed, it does not happen on my machine, for example).  Hope that helps you track down the cause.

                Björn

                --
                --
                You received this message from the "vim_mac" 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_mac" group.
                To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
                For more options, visit https://groups.google.com/groups/opt_out.
              • anilg
                ... Thanks Björn, that s great - feels like a lot of leads there - I ll go that route. -- -- You received this message from the vim_mac maillist. Do not
                Message 7 of 7 , Aug 20 5:17 AM
                • 0 Attachment
                  > On Tue, Aug 20, 2013 at 8:27 AM, anilg wrote:
                  > > $ ps -ax | grep vim
                  > > /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_426088
                  > > /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -p /path/to/file/example.txt
                  >
                  > I tried to find stable MacVim 7.3 but the website has PHP errors.
                  > I got snapshot 70 of 7.4 for OS X 10.8 from Github (I have 10.8.3) but it doesn't respect my ~/.vimrc?
                  > I still have MacVim-7_3-66.tbz but I seem to remember there were problems so I didn't use it.
                  > I still have MacVim-7_3-53.tbz which is what I've got currently.
                  > I might try to re-install that again.

                  On Tuesday, 20 August 2013 17:46:18 UTC+10, björn wrote:
                  > You should be running snapshot 70 -- if you have problems with .vimrc then start a new thread and ask for help, but it should work.  Snap 70 fixes the problem of 53 where using "+" to open Spotlight searches caused a warning message (but the search term will still be highlighted if there is a match).
                  > By the way, everything indicates that you are running some sort of program (something like a SIMBL plugin perhaps?) that causes Spotlight searches to be included in the "open" event that is sent when you open files from Finder.  Normally, this only happens when you open a file by typing in the Spotlight search bar and opening a file (in which case MacVim highlights the search term) -- this should not happen when you double click a file in Finder (and indeed, it does not happen on my machine, for example).  Hope that helps you track down the cause.

                  Thanks Björn, that's great - feels like a lot of leads there - I'll go that route.

                  --
                  --
                  You received this message from the "vim_mac" 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_mac" group.
                  To unsubscribe from this group and stop receiving emails from it, send an email to vim_mac+unsubscribe@....
                  For more options, visit https://groups.google.com/groups/opt_out.
                Your message has been successfully submitted and would be delivered to recipients shortly.