Skip to main content
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 ...
user938271's user avatar
  • 6,032
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! ...
Sri Harsha Chilakapati's user avatar
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. ...
idbrii's user avatar
  • 763
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 ...
shadowtalker's user avatar
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 ...
apostl3pol's user avatar
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 ...
Christian Brabandt's user avatar
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 ...
Vivian De Smedt's user avatar
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 ...
d.k's user avatar
  • 774

Only top scored, non community-wiki answers of a minimum length are eligible