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

Re: MacVim forces last pattern search with flags to vim

Expand Messages
  • Tony Mechelynck
    ... In Vim at least, the -o flag is supposed to open multiple files in separate windows. Not OS windows (that you can overlap on the screen)) but Vim
    Message 1 of 3 , Jul 16, 2013
    • 0 Attachment
      On 07/17/13 00:52, AnilG wrote:
      > I've got a problem with MacVim that I'm hoping can be accepted here. I find that MacVim forces certain flags to be used which are mostly inconvenient. Can this be fixed in any way?
      >
      > When using /usr/local/bin/mvim to start vim directly from the command line benign flags are used and can be adjusted in /usr/local/bin/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.

      In Vim at least, the -o flag is supposed to open multiple files in
      separate windows. Not "OS windows" (that you can overlap on the screen))
      but "Vim windows" (one above another in a single Vim screen, as with
      :new or :sview). If there is no room for the split windows (and in
      particular if you're using what I call "Rolodex Vim", setting
      'winheight' to a large number) -o won't work without a count.

      See :help -o

      Except (IIUC) with MacVim, different "OS windows" cannot be handled by a
      single instance of Vim, so if you have a question about that Mac-only
      behaviour, it should best be asked on the vim_mac list.

      >
      > The '+/' initates a search on the last pattern used.
      > This is reliable and 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.

      In red? Does your colorscheme set the Search highlight group to 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 "-o" ? That's the culprit right there!
      >
      Moving the cursor onto the first occurrence of the last pattern you used
      when you previously ran Vim? That's unusual behaviour! Normally (see
      $VIMRUNTIME/vimrc_example.vim lines 72 to 80) Vim opens each file with
      the cursor placed where it was the last time you closed that file.

      Again, questions about MacVim-only behaviour (which doesn't happen when
      you run good old vim in a Terminal) should be asked in the vim_mac list.


      Best regards,
      Tony.
      --
      Any resemblance between the above views and those of my employer, my
      terminal,
      or the view out my window are purely coincidental. Any resemblance between
      the above and my own views is non-deterministic. The question of the
      existence of views in the absence of anyone to hold them is left as an
      exercise for the reader. The question of the existence of the reader is
      left
      as an exercise for the second god coefficient. (A discussion of
      non-orthogonal, non-integral polytheism is beyond the scope of this
      article.)
      (Ralph Jennings)

      --
      --
      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@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • AnilG
      ... Thanks Tony - I ll take this where I should ve looked harder for earlier. I run good old vim in as many places as I can or have to. As a matter of fact,
      Message 2 of 3 , Jul 17, 2013
      • 0 Attachment
        On Wednesday, 17 July 2013 10:13:22 UTC+10, Tony Mechelynck wrote:
        > Again, questions about MacVim-only behaviour (which doesn't happen when
        > you run good old vim in a Terminal) should be asked in the vim_mac list.
        > Best regards,
        > Tony.

        Thanks Tony - I'll take this where I should've looked harder for earlier.
        I run good old vim in as many places as I can or have to.
        As a matter of fact, I'm running it right now.
        Sorry for the intrusion.

        --
        --
        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@....
        For more options, visit https://groups.google.com/groups/opt_out.
      Your message has been successfully submitted and would be delivered to recipients shortly.