GithubHelp home page GithubHelp logo

Comments (22)

junkblocker avatar junkblocker commented on May 30, 2024

hi @ReneFroger , I am not sure I understand what you mean by getting it 'compiled into a binary'. You already mention that you have a csearch binary that works from the command line.

You can try setting g:unite_codesearch_command to specify the complete path of the csearch executable on your system just in case Vim isn't picking it up for some reason. This has to look something like

  let s:codesearch_command = "c:\\your\\csearch\\bin\\dir\\csearch.exe %d "%s"'

or maybe

  let s:codesearch_command = "c:/your/csearch/bin/dir/csearch.exe %d "%s"'

. Let me know if that helps.

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

Hi @junkblocker, thanks for your kind reply. Are you sure that the first example path is correct? Because the "%s"' escaped the first double quote. So guess you mean '%s' and then double quote?

I tried both path with the really path to my csearch.exe, with the %s between single quotes. Then :Unite codesearch without any result. I don't get any error message or something, the screen stays empty.

In case of above is unclear to you, say it please. Then I will record a screencast of the progress.

Any tips by the chance?

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

Sorry, that was just a bunch of typos. I meant to have single quotes outside and double quotes around %s (and also -m) like so:

  let s:codesearch_command = 'c:/your/csearch/bin/dir/csearch.exe -m %d "%s"'

Does running

:!csearch -m 10 i

(or any other variations with csearch.exe, full path etc. in Vim produce any output for you?

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

Thanks for your reply, yes I was already saying that. I tried that already with the single quotes. :)
I tried the following:

let s:codesearch_command = "C:\\Dropbox\\Vim\\vim74\\csearch.exe -m %d '%s'"

And

let s:codesearch_command = "C:/Dropbox/Vim/vim74/csearch.exe -m %d '%s'"

With :Unite codesearch, I get no results. I noticed the input is invalide with the red label. But I don't see any error message whatsoever.

In my Windows cmd, I run only the words csearch exampleword and it gives me the desired output (without -m or another tags). Any idea how I could look further for a solution? I can make a screencast to make it more clear where things went wrong on my side, if you want.

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

I need to know the answer to running

:!csearch -m 10 i

inside vim not in Windows cmd. That will tell me if path or related issues are occuring. While we are at it, you could also tell me if (again inside vim) just

:!csearch

produces the help output.

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

Sorry for my belated response, due to work load. But here is my reply then! :-)

When I do :!csearch -m 10 i, I get this output:

schermafdruk 2014-09-23 22 21 25

Then :!csearch gives me this:

schermafdruk 2014-09-23 22 21 51

It's responding, it seems? But when I do csearch exampleword-to-search, it will find. Is that output useful to be wrapped into your plugin?
(I wanted this feature, because I'm planning to make a video about how useful Unite is, which it will be displayed on shougo/unite github page, and on reddit.com/r/vim).

Thanks in advance for your reply!

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

This looks like you are using a different codesearch (maybe from the original google version?) and not my this fork of codesearch. I have added the -m option to my fork to limit the amount of results returned. So please try with this codesearch and let me know if it still does not work.

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

Yes, I use the original Google version. It was the only Windows binary of Codesearch that I could find. I never thought that your fork would be working on Windows. As it seems, I couldn't find any binaries in your fork. Only go-files. I. Will try to figure out the Go language and how to get working on Windows, use your fork, and then reply you back. Sorry for any inconvience.

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

No worries. If you install go ( http://golang.org/dl/ ), you can just do

go get github.com/junkblocker/codesearch/...

to get my fork built for windows acc. to another user I've talked to in the past. Let me know how that goes.

I don't really want to get into providing binaries unless go's cross platform builds also work for windows. That's something I have on my list of things to explore sometime.

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

So go does do cross platform builds pretty easily and I was able to build the windows binaries. However I want to automate the process of publishing the binaries here, figure out my tagging scheme and the release strategy. So, that will need some time so it will probably need to wait for this weekend.

Meanwhile, if you want the binaries I build, let me know an email address to send it to. Mine is in my profile. Specify which platforms (windows, linux etc.) and archs (386, amd64) etc. you want.

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

Awesome! You're my new hero! :-)

I use Windows 7 x64 with amd64 chipset. Is that possible to compile anything in that instruct set, if I might ask? I will e-mail you now.
When the codesearch feature is working, I will record my video and share it!

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

:) Yes, go can cross compile for 386, amd64 and some arm for most all OSes. Sent you the download link by email.

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

Thanks for your mail, I continue the conversation here for future reference for others. I grabbed the binaries from your downloadlink, and replaced csearch.exe, cgrep.exe and cindex.exe in the folder vim74.

When I do run a search, it worked fine:

schermafdruk 2014-09-24 22 42 49

After starting up Vim, I run :Unite codesearch. It's already marked red, even when I don't typed anything yet, don't know why. I can type words, but they're still marked red and don't get any results after Enter (yes, I tried hlsearch too)

schermafdruk 2014-09-24 22 46 46

In my Vimrc settings, I tried the following:

let s:codesearch_command = "C:\\Dropbox\\Vim\\vim74\\csearch.exe" 

and

let s:codesearch_command = "C:\\Dropbox\\Vim\\vim74\\csearch.exe -m %d '%s'"

I tried it with single backslash too, without result. Any tips where I could get looking? In the command line it worked fine.

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

It's missing the -m %d "%s" part. Try with

let s:codesearch_command = "C:\\Dropbox\\Vim\\vim74\\csearch.exe -m %d '%s'"

or

let s:codesearch_command = "C:/Dropbox/Vim/vim74/csearch.exe -m %d '%s'"

etc.

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

Both lines didn't worked yesterday. I tried with another variant

let s:codesearch_command = "C:\Dropbox\Vim\vim74\csearch.exe -m %d '%s'"

Without result. Any tips how I could debug this?

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

Silly me, copy paste issue :( The variable needs to be g:unite_codesearch_command and not s:codesearch_command because that's only for script use. Sorry for so much waste of time :(

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

No problem! Already happy that you would help me. Well, it changed something.

With both

let g:unite_codesearch_command = "C:\DropboxVim\vim74\csearch.exe -m %d '%s'" 
let g:unite_codesearch_command = "C:\\Dropbox\\Vim\\vim74\\csearch.exe -m %d '%s'"

I get error messages when I type my input into Unite codesearch, Propably from Vimproc that he couldnt find the Windows style path. With the POSIX path,

let g:unite_codesearch_command = "C:/Dropbox/Vim/vim74/csearch.exe -m %d '%s'"

I don't get any error. Propably Vim interpret the right path there. But whatever I type, like hlsearch, the keys are invalid (as in, red label from Unite, that he couldn't find anything, like in the screenshot that I posted earlier).

Then tested with csearch in cmdprompt, it worked fine. Any tips?

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

Maybe you are not starting in insert mode. So try

:Unite -start-insert codesearch

Beyond that it'd be hard to figure out without actually being on the system.

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

Thanks for your reply, didn'thelp. But I was thinking about this issue, I will mail you tommorow with another possible way to finding a solution to this issue. Thanks for your time, by the way!

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

I've done a binaries release. I'm closing this bug now as the remaining part is really related to unite-codesearch on windows.

from codesearch-pre-github.

ReneFroger avatar ReneFroger commented on May 30, 2024

However the Unite codesearch never worked on Windows yet, I mentioned Unite Codesearch in video.

Maybe it get some traction in the Vim community that it deserved!

from codesearch-pre-github.

junkblocker avatar junkblocker commented on May 30, 2024

@ReneFroger, sorry I got busy and didn't reply to your email. Thanks for the mention, 👍 ! I have to say I saw the video and my Mac/FreeBSD selves are hurt at seeing 'Linux only', 💔 😜 . I realize you were speaking in layman terms 😄 .

I've moved this issue over to junkblocker/unite-codesearch#1 and have an idea what's happening. Let's continue the discussion over there.

from codesearch-pre-github.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.