edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Opening files from spotlight leads to error messages #266

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When opening a file from OSX spotlight, an error message comes up.
Nothing critical, it goes away with the press of a button.

The error that pops up is always related to the term that was searched for
in spotlight. For example:
- I have a file named "testfile.rb"
- I search spotlight for testf
- testfile.rb comes up as a search result and I hit return
- MacVim opens up as it is the default application for .rb files
- the following error appears:

~/Code/ruby/testfile.rb" 9L, 168C
Error detected while processing command line:
E486: Pattern not found: testf    

Any key makes the error go away.
The "pattern not found" is always whatever was searched for in spotlight.

What steps will reproduce the problem?
Opening any file that opens with MacVim by default from spotlight

What version of MacVim and OS X are you using:
Snapshot 52
Mac OS X 10.6.3

Original issue reported on code.google.com by z...@me.com on 18 Apr 2010 at 7:46

GoogleCodeExporter commented 9 years ago
Thanks for the report -- I was aware of this problem but have not come up with 
a solution to it.

The reason for the error is that when you open from Spotlight MacVim tries to 
highlight the search term (the way 
other apps do as well) but if the file does not contain the search term you get 
an error.  I've tried to make Vim 
suppress the error message when there is no match but can't seem to figure out 
how this is done.

I may just disable the automatic search, although when it matches it is a nice 
feature.

Original comment by bjorn.winckler@gmail.com on 18 Apr 2010 at 11:03

GoogleCodeExporter commented 9 years ago
I see, that explains it.

I agree that when it matches it is a nice feature, but this is very much 
dependent on
how somebody uses spotlight.

For example, the majority of the time I use it to find things by file name, 
therefore
highlighting terms within a file is unnecessary but somebody else might use 
spotlight
to mainly find things inside a document where the highlight feature is nice 
(assuming
they have hlsearch).

I would say: please keep the feature in MacVim, its best had then not had. An
unnecessary luxury would be if there was an option to turn it off/on, but I am 
sure
that everybody can live with pressing any key to continue when the "pattern not
found" comes up.

Original comment by z...@me.com on 20 Apr 2010 at 5:32

GoogleCodeExporter commented 9 years ago
I've fixed this problem now -- no more error message if the Spotlight text 
could not be found.

Original comment by bjorn.winckler@gmail.com on 1 Sep 2010 at 4:14

GoogleCodeExporter commented 9 years ago
How did you fix it?

Original comment by imagee...@gmail.com on 7 Sep 2011 at 5:15

GoogleCodeExporter commented 9 years ago
I'm having this issue now. If it was fixed a year ago, it seems to be unfixed 
now.

MacVim version 7.3 (53), OS X 10.7.1.

Original comment by Ricky28...@gmail.com on 11 Oct 2011 at 4:36

GoogleCodeExporter commented 9 years ago
Still works for me.  How do you reproduce?  Does it depend on file name/type or 
the name of the folder it is in (e.g. are there spaces or other non-alphabetic 
characters in the name)?

Note that build 53 DOES NOT work well on Lion.  You have to update to the 
latest snapshot (currently build 62).

Original comment by bjorn.winckler@gmail.com on 11 Oct 2011 at 9:05

GoogleCodeExporter commented 9 years ago
Steps to reproduce:
1. Double-click a file that opens with MacVim.
2. Type "/asdf" (or some other keyword that does not appear in the file) and 
hit enter.
3. The message should say "Pattern not found: asdf"; ignore it and click the 
close button in the top-left to close the window.
4. Double-click any file which does not contain "asdf" and opens with MacVim. 
The MacVim window will open with the message at the bottom:

"~/path/to/file.txt" 28L, 581C
Error detected while processing command line:
E486: Pattern not found: asdf
Press ENTER or type command to continue

5. Pressing ENTER opens the file anyway.

I tried files of different extensions in other folders and it does the same 
thing. Also, quitting MacVim entirely after step 3 does not change the error.

Is there an easy list of the known issues with build 53 in Lion, because I 
don't recall encountering any other issues except this one and I'd rather not 
update unless I see the need. But maybe it would fix this problem too.

Original comment by Ricky28...@gmail.com on 11 Oct 2011 at 3:01

GoogleCodeExporter commented 9 years ago
So...you are not using Spotlight then (which is what the original issue was 
about)?

It seems to me that you are having a plugin or configuration problem.  Please 
go through the troubleshooting guide:

https://github.com/b4winckler/macvim/wiki/Troubleshooting

If that doesn't lead you to a solution you ask for help on the vim_use Google 
group.

Original comment by bjorn.winckler@gmail.com on 12 Oct 2011 at 7:41

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi M. winckler, thank you very much for you great job.

Unfortunately I have tbe exact same problem as Ricky28 described, but it only 
occurs when opening file from finder (open with and/or double click), not when 
I use a droplet or mvim.

I also tried to trouble shoot it using the link you gave,  but it still 
happening even when no plugin are loaded (moved ~/.vim folder). any though ?

Original comment by abezz...@gmail.com on 29 Nov 2011 at 11:43

GoogleCodeExporter commented 9 years ago
#7 and #10: this is a separate issue.  Please don't hijack other issues, 
instead open a new one and I will try to help.

Original comment by bjorn.winckler@gmail.com on 30 Nov 2011 at 9:07