Closed Soares closed 11 years ago
+1 for this pull request its awesome
My only addition would be to not have the key remaps happen if the person is using an alternate quickfix handler
I just deleted them in the plugin because I don't really know how to check if its not the standard and switch off of that
ie delete
exec "nnoremap <silent> <buffer> q :ccl<CR>"
exec "nnoremap <silent> <buffer> t <C-W><CR><C-W>T"
exec "nnoremap <silent> <buffer> T <C-W><CR><C-W>TgT<C-W><C-W>"
exec "nnoremap <silent> <buffer> o <CR>"
exec "nnoremap <silent> <buffer> go <CR><C-W><C-W>"
exec "nnoremap <silent> <buffer> v <C-W><C-W><C-W>v<C-L><C-W><C-J><CR>"
exec "nnoremap <silent> <buffer> gv <C-W><C-W><C-W>v<C-L><C-W><C-J><CR><C-W><C-J>"
I've updated the pull request to allow users to turn off the custom mappings (and to turn them off by default when the user changes the handler).
However, milesz's ack.vim is looking pretty dead. If you check out my fork I've actually added a number of few features, including:
<leader><character-of-your-choice>
)Ha. To be fair, I just pulled in several requests a couple weeks ago. So, only half-dead. I will try to make time to test your pull requests today or tomorrow.
On Thu, Nov 15, 2012 at 3:25 AM, Nate notifications@github.com wrote:
I've updated the pull request to allow users to turn off the custom mappings (and to turn them off by default when the user changes the handler).
However, milesz's ack.vim is looking pretty dead. If you check out my forkhttps://github.com/Soares/ack.vimI've actually added a number of few features, including:
- Speed (using autoload)
- Simplification
- Smart search from the word under the cursor
Opt-in mappings (namespaced under )
— Reply to this email directly or view it on GitHubhttps://github.com/mileszs/ack.vim/pull/51#issuecomment-10400646.
My mistake! I missed that when I was glancing over the activity. I didn't mean to offend! :-)
If you have any time, a few big things I'd suggest you implement:
'"\b'.escape(expand('<cword>'), '"').'\b"'
instead of just expand('<cword>')
.AckFromSearch
. At the least I'd add escape(search, '"')
before surrounding it in quotes. You may also want to strip out \@
, \z
, \v
, \m
, and \%
characters (for starters). Real conversion will require you to me aware of the magic level and will require a lot more effort. Vim regexes are hard to convert to perl regexes.I personally removed AckFromSearch
in my fork, because not only is it half-implemented and broken but it's easy to replace. You can already do
:Ack <C-R>/
to ack from search and it's less typing than :AckFromSearch
! At the least I'd suggest
:AckWord
which escapes quotes and surrounds the search in "
s and \b
s. :AckWord <C-R>/
is still less typing than AckFromSearch
.
Hey @Soares one more quick question.
What change is it that keeps ack from just blindly jumping to the first?
I've got the quickfix in ctrlp but ack still opens the first
Use :Ack!
In mileszs' version (and with vim :grep
) vim will jump unless you provide the bang. In my branch I inverted that because I think it makes more semantic sense to only jump when 'forced'.
For what it's worth, I agree that the inverse makes more sense semantically. However, for this particular plugin, I'm trying to emulate grep in Vim.
On Thu, Nov 15, 2012 at 1:55 PM, Nate notifications@github.com wrote:
Use :Ack!
In mileszs' version (and with vim :grep) vim will jump unless you provide the bang. In my branch I inverted that because I think it makes more semantic sense to only jump when 'forced'.
— Reply to this email directly or view it on GitHubhttps://github.com/mileszs/ack.vim/pull/51#issuecomment-10420492.
Nice thanks guys
Merged!
This allows people to do things like
let g:ack_qhandler='CtrlPQuickfix'
and have the results handled by CtrlP's quickfix mode.