5
votes
Accepted
How to open folds in a pedit-preview popup window?
What I've tried is a exe ':'.pupid.'windo norm! zi' however the command fails upfront with and 'Invalid range` error. The pupid is being obtained via popup_findpreview() and is correct.
That's ...
2
votes
Accepted
How to create Preview window to display a string?
After seven hours of fiddling with the documentation and searching, I was able to write a function that takes a filetype, an array of strings and show a dummy buffer based on that.
function! ...
2
votes
Accepted
Enable cursorline only in preview window?
:h BufWinEnter is the event:
:autocmd! BufWinEnter * if &previewwindow | setlocal cursorline | endif
I guess the discrepancy is because WinEnter is triggered before 'previewwindow' is set. ...
2
votes
nvim-lspconfig omnifunc opens preview window
This happens when completeopt has the preview option in it. You probably added this to your config at one point.
Check verbose set completeopt? to see its contents and where it was last set from, so ...
2
votes
Remove/hide control characters in the vim-fireplace preview window
Thanks to @D. Ben Knoble for helping me to understand what was going on. It was the timbre logging library that was adding the color characters.
To turn them off, I added the following to my ...
2
votes
How to open folds in a pedit-preview popup window?
If you look at the help for the :pedit command, you will see this:
:ped :pedit
:ped[it][!] [++opt] [+cmd] {file}
Edit {file} in the ...
1
vote
Accepted
Show lines in scratch buffer in preview window
I would do:
function! LoadPreviewWindow(bufnr)
try
wincmd P
catch
silent! pedit!
wincmd P
endtry
execute 'b' . a:bufnr
wincmd p
endfunction
" show in preview window
...
1
vote
How to populate the preview window?
I found, that despite that the pedit command accepts a file name, it doesn't have to be an existing file. So with pedit some-dummy-name.txt one can use the currently opened preview window ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
previewwindow × 9vim-windows × 3
vimscript × 2
popup-menu × 2
scratch-buffer × 2
buffers × 1
autocompletion × 1
functions × 1
ctags × 1
plugin × 1
lsp × 1
echo × 1
cursorline × 1
control-character × 1
filetype-clojure × 1