bfrg / vim-qf-preview Goto Github PK
View Code? Open in Web Editor NEWPreview the quickfix item under the cursor in a popup window
Preview the quickfix item under the cursor in a popup window
Hi,
Thank you for vim-qf-preview.
If I use:
let g:qfpreview = {
\ 'top' : "\<Home>",
\ 'bottom': "\<End>",
\ 'scrollup' : "\<C-k>",
\ 'scrolldown': "\<C-j>",
\ 'halfpageup' : "\<C-b>",
\ 'halfpagedown': "\<C-f>",
\ 'fullpageup' : "\<PageUp>",
\ 'fullpagedown': "\<PageDown>",
\ 'next': "\<Down>",
\ 'previous': "\<Up>",
\ 'reset': "r",
\ 'close': "q",
\ 'number': "1",
\ 'height': "15",
\ 'offset': "7",
\ 'sign': {'linehl': 'CursorLine'},
\ }
Everything works fine. But if I change the <C-k>/<C-j> to <C-Up>/<C-Down>, as in:
\ 'scrollup' : "\<C-Up>",
\ 'scrolldown': "\<C-Down>",
Then these do not work anymore. I do use <C-Up>/<C-Down> successfully for other things in vim (not in popup)
Do you know if it is possible to make this work ?
thx,
-m
Currently the error line can be highlighted using the sign
option (see :h qfpreview.sign
). But there's no option to highlight the column in the displayed buffer.
What colorscheme are you using?
thx
Sometimes the popup window is unexpectedly closed when moving to the next or previous quickfix item with the keys specified in with next
and previous
options.
It seems to be caused by vim-cool and occurs when n or N are pressed right before the preview popup is opened. It happens only with the following vim-qf-preview settings:
let g:qfpreview = {'previous': 'p', 'next': 'n'}
but not with, for example:
let g:qfpreview = {'previous': "\<c-p>", 'next': "\<c-n>"}
To reproduce
vimrc
:
let g:qfpreview = {'previous': 'p', 'next': 'n'}
augroup test
autocmd!
autocmd FileType qf nmap <Buffer> p <Plug>(qf-preview-open)
augroup END
vimgrep function $VIMRUNTIME/*
or similar command to populate the quickfix list./
or ?
pattern. It doesn't matter whether the next occurrence is found.Now use different keys for next
and previous
:
let g:qfpreview = {'previous': "\<c-p>", 'next': "\<c-n>"}
augroup test
autocmd!
autocmd FileType qf nmap <Buffer> p <Plug>(qf-preview-open)
augroup END
and repeat the above steps. Everything works as expected.
Hi,
Thanks for an awesome plugin.
I was wondering about adding:
1). additional mappings for close (ie q, <Esc>, <C-c>, etc.)
2). an auto popup mode where scrolling in qf auto pops the preview
Would you consider such features ? If so I will look into it.
thx,
-m
Hello,
Since the commit introducing vim9, I systematically get an error when trying to display a preview.
I'm using gvim_9.0.2081.0
and vim-qf-preview
on its latest stable commit on Windows10
autoload/qfpreview.vim
:vim open %
qflist
item with vim-qf-preview
The preview is displayed
The error points to the following line:
const firstline: number = qf_item.lnum - Getopt('offset') < 1 ? 1 : qf_item.lnum - Getopt('offset')
and apparently vim9
does not like the fact that Getopt('offset')
returns a String
.
Problem:
https://github.com/itchyny/vim-qfedit is provide QuickList ediable feature.
But now, confilict keymap 'p'
this plugin and that one.
It is inconvenient because I cannot put it.
Need and/or Solution:
This plugin will be providing "preview kick keymap customization".
('p'
is natural put keymap, keep it is happy! :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.