5 ms·
VimAck: A port of TextMate's Find-in-Project feature for MacVim.app
- jarin 15y agoThat is pretty nice, although I found myself using 'git grep' even with Textmate (before I switched to vim) because it was much faster than TM's Find in Project.
- beaumartinez 15y agoFrom the screencast[1] it looks like this doesn't support keyboard navigation―why is the search an OS-native window and not a Vim window? [1] https://github.com/jtaby/VimAck/raw/master/resources/vimack_demo.mov https://github.com/jtaby/VimAck/raw/master/resources/vimack_...
- spicycode 15y agoJust use ack.vim [1]. It works from any vim instance and is a standard vim plugin. [1] http://www.vim.org/scripts/script.php?script_id=2572 http://www.vim.org/scripts/script.php?script_id=2572
- jtaby 15y agoThe problem with a native vim window is that it doesn't give you much affordance in terms of UI, you can't collapse files that have a lot of matches, hard to remember options and syntax for regex/case sensitivity, etc.
- smosher 15y agoThe collapsing sounds like a valid complaint. The rest falls on deaf ears for this vim user. I would expect most vim users to feel the same since those complaints are either considered features or the common barrier to entry that vim has anyway. Am I wrong?
- jtaby 15y agoYou can consider it a matter of preference, I suppose. I prefer having a GUI file browser over NERDTree for similar reasons as I outlined before. VimAck has the same line of thinking behind it.
- smosher 15y agoYeah, I totally get that. I'm just assuming that the average vim user is going to prefer things to work vim-native over anything else.
- spicycode 15y agoIt puts the results in a quickfix window, which has a well-defined set of keybindings for navigation and refinement.
- beatlevic 15y agoI would love to see this feature implemented in a similar way for Emacs.
- alnayyir 15y agoAlready exists in the form of ack mode, which is better integrated with the editor. https://github.com/defunkt/emacs/blob/master/vendor/ack.el https://github.com/defunkt/emacs/blob/master/vendor/ack.el http://nschum.de/src/emacs/full-ack/ http://nschum.de/src/emacs/full-ack/ There are others, but this should suit anybody's needs. Edited to provide examples.
- jroes 15y agoDefunkt has actually ported a lot of cool textmate features including find-in-project over here in textmate.el: https://github.com/defunkt/textmate.el/ https://github.com/defunkt/textmate.el/
- jtaby 15y agoAdding support for other editors was something I am definitely mulling over, maybe version 2
- alnayyir 15y agoWe (emacs) already have like 5-6 ack modes, I beg of you, don't add to the list. Just find which one you like best and offer improvements.
- zefhous 15y agoThis is a great start! I have ack.vim installed, but I frequently open the project in TextMate to search with TM's AckMate bundle. Project search one of the last things with Vim that I haven't had a good solution to. ack.vim works, but it blocks vim so you can't do anything while it's working, and also the quickfix window is not ideal for a lot of uses.
- shennyg 15y agoNice work. A few notes: "Button" label should say search or go. There is no "results not found" It is hard to tell if it is doing anything, maybe add a animated icon showing it is working.
- jtaby 15y agoThanks for the feedback, I'm going to prioritize those features for the next release :)
- fictorial 15y agoNice work. I am using lusty juggler's buffer grep right now for something similar.
- askedrelic 15y agoYea, I just found LustyBufferGrep and BufferJuggler this weekend and am definitely digging it. http://www.vim.org/scripts/script.php?script_id=1890 http://www.vim.org/scripts/script.php?script_id=1890
- mrinterweb 15y agoThis looks nice, but I prefer the functionality provided in vim. In your .vimrc, you can set grepprg to ack, grep, or (my favorite super fast search) git grep. Then if you want to display the results just type ":copen". Example: "set grepprg=git\ grep\ -n"
- burgerbrain 15y agoI've used the following in Vim for years now: :nmap <C-f> :!ack <cword><CR> No sense in being any more complex than that, as far as I can tell.
- jtaby 15y agoWell, the reason I built this is that it's much nicer to browse the results IMO. You can collapse files, you get bolded fonts, you get different colors, and much better use of whitespace. It's also easier to define options like regex and case-sensitivity vs. having to remember the flags in the command. The benefit is one of UI/UX, it doesn't actually perform an action you couldn't perform text-only.
- gte910h 15y agoThank you for this. This has definitely been a "missed feature" for awhile now.