MacVim forces last pattern search using vim flags

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

MacVim forces last pattern search using vim flags

AnilG-2
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: MacVim forces last pattern search using vim flags

AnilG-2
> $ 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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: MacVim forces last pattern search using vim flags

Björn Winckler
On Wed, Jul 24, 2013 at 1:59 PM, anilg wrote:
> $ ps aux | grep vim
> /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_<a href="tel:3105526" value="+13105526">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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: MacVim forces last pattern search using vim flags

AnilG-2
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: MacVim forces last pattern search using vim flags

AnilG-2
> 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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: MacVim forces last pattern search using vim flags

Björn Winckler
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: MacVim forces last pattern search using vim flags

AnilG-2
> 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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: MacVim forces last pattern search using vim flags

AnilG-2
In reply to this post by AnilG-2
On Friday, 19 July 2013 00:35:52 UTC+10, anilg  wrote:

> 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.
>
> $ ps aux | grep vim
> /Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_3105526
> /Applications/MacVim.app/Contents/MacOS/Vim -g -f +/ -o /Volumes/Data/Users/user/Desktop/test.txt

I've installed snapshot 70 and that seems to have done the trick. I've started a thread for a problem with my snapshot 70.

$ ps aux | grep vim
/Applications/MacVim.app/Contents/MacOS/Vim -g -f -o /Volumes/Data/Users/a.gulati/Desktop/email_signature.txt
/Applications/MacVim.app/Contents/MacOS/MacVim -psn_0_319566

The +/ flag has gone now which solves the issue.

I still don't understand the -o flag, apparently. man vim says it will "open a window per file", but if I select multiple files in Finder and open with MacVim I get splits, as I've specified in my Preferences, which is what I want, so no problem for me. I remember getting windows unpredictably sometimes in previous versions so if that comes up again I'll attempt to trace it down, otherwise no more complaints on this :-)

Thanks very much for your help. I'm confident to continue to run snapshots now, and notify bugs, if that helps.

--
--
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 [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.