We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [scratch-buffer]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
114 views

How to create Preview window to display a string?

I'm using a LSP plugin to call a command from the server, and currently it is logging the data using echom. My current code is like this: function! PtypeCallback(result) echom json_encode(a:...
1
vote
1answer
199 views

how to create a buffer like a fugitive temporary buffer

When we call :Gdiff on a file, fugitive will create a buffer with a name fugitive:///path/to/file/. The modifiable option is off and readonly option is on. Most importantly, the file does not exist on ...
2
votes
1answer
228 views

How to create a new 'secure scratchpad' buffer?

I want to be able to create a new buffer (and a new window with which to interact with it) to work with secret or sensitive info, e.g. passwords. Ideally, none of the contents of the buffer would ...
1
vote
2answers
616 views

What is the difference between :file and :saveas

Both :file and :saveas seem to change the name of the buffer without writing. What's the difference between them? Also, in scratch buffers, :saveas seems to cause an error while :file does not. I ...
2
votes
1answer
530 views

How to detect the buffer number of new buffer

I would like to create a new scratch buffer in vim script. I would like to use this buffer to output the result of the execution of a scala script. I am creating the buffer with this function: ...
3
votes
1answer
217 views

How can I reset the scratch / preview buffer height?

When performing autocompletion on PHP or javascript, vim opens a scratch buffer which contains info about the function being autocompleted. Unfortunately, I increased the height of this scratch buffer ...
66
votes
6answers
29k views

Is there an easy way to close a scratch buffer/preview window?

One of the plugins I have installed (probably Supertab) provides a nice view of documentation for the currently highlighted item in the completion menu: The (apparently) scratch buffer remains open ...