Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use search #87

Open
gzagatti opened this issue Jan 29, 2016 · 10 comments
Open

Unable to use search #87

gzagatti opened this issue Jan 29, 2016 · 10 comments

Comments

@gzagatti
Copy link

Hi @fmoralesc,

I'm unable to use the search tool. Every time I enter the search bar, no search is executed. The query becomes: >> [NEW], which leads me to create a new note. I thought the problem might be because I didn't have the appropriate tool for the search mechanism as I'm using OS X. I've installed ack with brew install ack and updated the g:pad#search_backend to ack without success.

My version of vim:

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan 20 2016 09:07:10)
MacOS X (unix) version
Included patches: 1-1090
Compiled by Homebrew
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
-balloon_eval    +float           +mouse_urxvt     -tag_any_white
-browse          +folding         +mouse_xterm     -tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         -gettext         -mzscheme        +textobjects
-clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      -toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con      -lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      -X11
-dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     -xim
+emacs_tags      -mouseshape      -sniff           -xsmp
+eval            +mouse_dec       +startuptime     -xterm_clipboard
+ex_extra        -mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    -xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H   -DMACOS_X_UNIX  -Os -w -pipe -march=native -mmacosx-version-min=10.11 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang   -L. -L/usr/local/lib -L/usr/local/lib -Wl,-headerpad_max_install_names -o vim        -lm  -lncurses -liconv -framework Cocoa   -fstack-protector  -L/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE -lperl -framework Python   -lruby.2.0.0 -lobjc
@cxgslegend
Copy link

This also does not work for me. I have not tried to use it with ack or anything.

@fmoralesc
Copy link
Owner

Sorry for the delay in replying, this issue fell in the cracks...

I would like to know:

  • if you have grep in your $PATH, and if it isn't where it is
  • if it's GNU grep or BSD grep ($ grep --version)

I recommend trying with ag (https://github.com/ggreer/the_silver_searcher), see if it makes a difference.

@cxgslegend
Copy link

I have grep and ag.
screen shot 2016-04-21 at 11 35 43 am

I have never tried to set up ag with vim-pad, however I still think grep should work. I am not sure what is going on here.

Here is a test I did where I added two notes with the word "search" in them. As you can see it just tries to create a new note.
screen shot 2016-04-21 at 11 41 02 am
screen shot 2016-04-21 at 11 41 35 am

But what is strange is that filtering is working for things like searching for an archive (so I guess grep is working sometimes).
screen shot 2016-04-21 at 11 43 11 am

@fmoralesc
Copy link
Owner

I think there was some incompatibility with BSD grep, I'll look into it.

Searching for directories doesn't call on grep.

@cxgslegend
Copy link

I just tried it with ag and it is working now. I am satisfied with this, but others might have similar issues trying to use grep. Thank you for your help (and the awesome plugin).

@Skyfold
Copy link

Skyfold commented Apr 23, 2016

Same issue, also on OSX. It sounds like BSD grep is the culprit.

If you use ag (the silver searcher), then it works fine. So you can do:
brew install the_silver_searcher then set let g:pad#search_backend = 'ag' in vimrc.

fmoralesc added a commit that referenced this issue Apr 23, 2016
@fmoralesc
Copy link
Owner

Just pushed some changes that should fix this, please confirm.

@Skyfold
Copy link

Skyfold commented Apr 23, 2016

Just pulled.

As far as I can tell c1fcb76 fixes the issue with grep on OSX.

@fmoralesc
Copy link
Owner

Cool.

I added a small tweak for python3 compat, but I think that will be it.

fmoralesc added a commit that referenced this issue Apr 23, 2016
@fmoralesc
Copy link
Owner

It seems like I pushed to the old master branch (the more recent one is devel) so I added it to it aswell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants