Questions tagged [hidden-buffers]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

How to remember all buffer settings without "hidden"?

When I close the last sub-window for a file, assuming that it has no sub-windows opened in any other tab, is there a way to have Vim remember all options (comments, textwidth, tabstop, shiftwidth, ...
user2153235's user avatar
0 votes
0 answers
28 views

Buffers not close automatically by Vimspector

I have been using Vimspector for debugging Python but like 8-10 months now, the Python terminal buffer that is opened by Vimspector when the debugger runs, is not automatically closed when the ...
Xxxo's user avatar
  • 187
0 votes
1 answer
32 views

How to search hidden buffer during insert-mode completion?

I am trying to write a completion function which has as its source a 386k line (CSS) file. Initially I read the file into a list with readfile() and used a for loop to iterate over each line, matching ...
Andy Stewart's user avatar
  • 1,329
2 votes
0 answers
19 views

fileformat=dos not persistent despite "set hidden fileformats=dos,unix"

I have posted about making fileformat=dos persistent in past years, here and here. So far, the best advice is :set fileformats=dos,unix hidden. It does cause fileformat=dos to persist, but only for ...
user2153235's user avatar
1 vote
1 answer
55 views

What's the benefit(s) of deleting buffers that are not loaded into a window?

As title. Say that I have 20 buffers and only 4 buffers are shown (Assume in my current tab, I only have 4 splits). Since 20 buffers are there and each one is attached with some LSPs, I assume that ...
NeoZoom.lua's user avatar
  • 1,322
1 vote
3 answers
458 views

Can you make it so that :e hides the current buffer but that :e! discards it?

Title says it all really. Sorry for noob question. I've noticed that if 'hidden' is set, :e! will do the same thing as :e (that is, put the buffer you're currently working on in the background and ...
wallefan's user avatar
  • 141
2 votes
1 answer
218 views

open several files into same buffer

I have several file paths saved in a register. I would like to open them all into the same new buffer. (as if I ran cat * files | vim - from command line. As this is part of a plugin, I would like to ...
Matthew Webb's user avatar
1 vote
1 answer
55 views

Make vim remember the fileformat of a buffer (round 2)

I followed the advice here to make only one buffer hidden so that it remembers settings like fileformat=dos: set bufhidden=hide " This should be the solution e ++ff=dos " All the ^M ...
user2153235's user avatar
0 votes
1 answer
298 views

How to implement an autocommand that deletes a buffer when it's being hidden and when it hasn't been modified in the last N seconds?

I'm trying to implement a simple autocommand, which deletes a buffer when it's hidden, with a condition that the file hasn't been modified in the last N seconds. I have the following code in ~/.vim/...
Severi Jääskeläinen's user avatar
5 votes
1 answer
314 views

Buffers that are neither active nor hidden

Both :ls and :buffers display a list with buffer information, giving indicators for each buffer. For example, # means the alternate buffer, and % means the current buffer. The meaning of each ...
mgarort's user avatar
  • 275
2 votes
2 answers
268 views

Buffer scope variable not exists when run autocmd BufUnload

Describe the issue I use a vim plugin that when use Vim to open a ipynb (python notebook) file, will call system function to use jupytext create corresponding python file to enable use like, YCM to ...
roachsinai's user avatar
2 votes
1 answer
220 views

Command to load buffer but not make it current

I can list buffers with :ls and see their load state. I can load all the buffers using :bufdo e and a specific buffer using a range, for instance to load only buffer 2 :2bufdo e, however this makes ...
mrloop's user avatar
  • 23
2 votes
2 answers
1k views

Move to window if specified buffer is opened

I am currently trying to write myself a function the will let me show or hide (toggle) the :terminal window. The only way to hide it, as far as I currently know, is to just navigate to that window and ...
ashrasmun's user avatar
  • 167
1 vote
1 answer
180 views

How to show the name of a help buffer in the tabline of the airline?

I use :h command to open a help buffer. When I switch to other buffers, I can't go back to the opened help buffer. How can I show the name of a help buffer in the tabline of the airline?
Fangquan Shi's user avatar
2 votes
1 answer
653 views

Everytime I call :Explore netrw creates a new unlisted buffer

Is there any way to stay always in the same netrw buffer after selecting a file to edit?
user24841's user avatar
1 vote
1 answer
891 views

Hide terminal buffer from buffer list

How do I keep the terminal buffer from showing up in my airline list of buffers? I assume airline just pulls buffers from what normally shows up in :ls. But I actually don't want the terminal to show ...
Josh Lawrence's user avatar
3 votes
1 answer
2k views

Creating a hidden buffer

I know that with commands like sbuffer you can create a new buffer and display it in a split window, and commands like enew can create a new buffer in the current window. But is it possible to not ...
SalmonKiller's user avatar
0 votes
0 answers
240 views

How to properly organize persistence of the vim state of all opened buffers?

Before switching to vim years ago I was using Sublime Text and it perfectly handled situations when I just close it and open again. Nothing is lost and at the place where I left it off. So I'm aiming ...
Georgy Grigoryev's user avatar
0 votes
1 answer
22 views

Open a second file and quit the previously opened one without saving

If I do something like this: vim i # Write some tmp text # This tmp file served it's purpose, want to quit this one and open a new one :e newfile # E37: No write since last change (add ! to override) ...
TheMeaningfulEngineer's user avatar
1 vote
0 answers
921 views

Why does "E89: No write since last change" error not occur when commands are joined with bar?

I have :set hidden set in my ~/.vimrc. First I did this: vim foo bar :bnEnter ihelloEsc :bpEnter :bd#Enter The :bd# command leads to this error: E89: No write since last change for buffer 2 (add ! ...
Goproto's user avatar
  • 11
1 vote
1 answer
187 views

vim :make :cwindow, I need error length character limit larger than 1000

I am compiling a program with :make command, then I examine g++ errors using :cwindow. The problem is that the error produced by g++ is longer than 1000 characters and it is cut. Currently I have to ...
Janek_Kozicki's user avatar
2 votes
1 answer
1k views

Buffers are left even when `nohidden` is set

I have explictly said in my vimrc that I want nohidden behaviour (I am jumping between files a lot, with long lasting session, and after some time buffers list is very polluted). However when I jump ...
Hauleth's user avatar
  • 217
3 votes
1 answer
695 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: ...
Giuseppe Pes's user avatar
2 votes
1 answer
2k views

"set hidden" leaves many *empty* buffers. Can I automatically get rid of them?

I recently added set hidden to my vimrc script because I didn't always want to :write a file before :editing another file. (With set nohidden, which is the default, this resulted in a E37: No write ...
René Nyffenegger's user avatar