-
Notifications
You must be signed in to change notification settings - Fork 395
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
Live preview #135
base: master
Are you sure you want to change the base?
Live preview #135
Conversation
Configurable using the g:ackpreview = 2 instead of g:ackpreview = 1
|
||
let fname = pos.bufnr | ||
|
||
if type(fname) == type(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I see you do not need this three if
s, you can do just:
if fname == ''
return
else
let fname = bufname(fname)
endif
Sorry about the delay on review it. Thank's for the feature! ❤️ |
This is great feature! As I understand it prevent your active window from overwriting by the first matched file form quickfix list? |
@oluckyman It allows you to view where the match is in a scratch window as opposed to the main window. |
+1 This would be a great feature. |
+1 this would be great! |
Nothin? |
execute "nnoremap <buffer> <silent> j j<CR><C-W><C-W>" | ||
execute "nnoremap <buffer> <silent> k k<CR><C-W><C-W>" | ||
elseif g:ackpreview == 2 | ||
execute "nnoremap <buffer> <silent> j :call ack#preview()<CR>j" | ||
execute "nnoremap <buffer> <silent> k :call ack#preview()<CR>k" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you were just copying the style above, but there's no need for execute
on these four nnoremap
lines.
I liked the preview ability but didn't like how it took over my main window. With this change, if you have
let g:ackpreview = 2
, it will show it in a Preview window instead.