Skip to main content
Share Your Experience: Take the 2024 Developer Survey
5 votes
Accepted

Why does the :ls command not display :help buffers?

I think the intention was, that using :ls helps you navigate your buffers on which you are actively working. If you open the help pages and browse between a few topics you can easily have 10s of ...
Christian Brabandt's user avatar
2 votes

Why does the :ls command not display :help buffers?

Help buffers have the 'buflisted' option reset (see :help unlisted-buffer). When you set this option in the help buffer it will be listed by :ls.
Jürgen Krämer's user avatar
2 votes
Accepted

How to force Vim to delete all the [No Name] buffers?

In the spirit of Friedrich's comment, using scratch buffers instead of regular buffers would seem to be a better strategy. FWIW, this is a very common use case for me, which I address with the ...
romainl's user avatar
  • 41.1k
2 votes

What is a scratch window?

This is building on NeilGs answer, with two changes: the scratch buffer opens in 1/3 of the window, instead of half-half. I find that to be more how I would like such a scratchpad to behave, not ...
EmilBB's user avatar
  • 121
2 votes
Accepted

How to let buffer show relative path when splitting?

When you do: :vsplit %:p:h/foo.bar Vim expands %:p:h to the full path of the directory containing the current file. This means that you give Vim the full path of foo.bar, which becomes the name of ...
romainl's user avatar
  • 41.1k
1 vote

Cannot go back to previous window of an opened one using bf, especially when having 2 or more windows open at the same time

When you do: $ vim compile.f rtl.f tb.f -O Vim creates one buffer for each file: compile.f, rtl.f, and tb.f and adds them to a global buffer list, generally in the order you gave at the command-line, ...
romainl's user avatar
  • 41.1k
1 vote

Why does :bd closes tabs instead of buffers?

Why does :bd closes tabs instead of buffers? If the "deleted" buffer is displayed in a window and its alternate file doesn't have unsaved changes, then the window is closed. If that window ...
romainl's user avatar
  • 41.1k
1 vote

Fastest way to switch to a buffer in Vim?

I do like @joeytwiddle. But also use the nano way to cycle through buffers, which I find pretty handy: " alt + , nnoremap ^[, :bp<cr> " alt + . nnoremap ^[. :bn<cr>
ranemirusG's user avatar
1 vote
Accepted

Configure buffer display name to show directory when buffer name is short

Some ideas: Press Ctrl-G, or run :file Configure your statusline For the statusline, you can experiment with %f (in the default), %F, and %t. I’ve rolled my own such that I can switch been short ...
D. Ben Knoble's user avatar
  • 26.4k
1 vote
Accepted

How do I get the first column of the current buffer after scrolling horizontally?

You can try the following: :echo winsaveiew()['leftcol'] That should always show the correct column for the left border.
Christian Brabandt's user avatar
1 vote

How to go to previous open buffer from Vim command line?

:bp goes to previous buffer. :bn goes to next buffer.
YuhaoHanHarry's user avatar
1 vote

Join two buffers into a single buffer

I would do: :let &tw=&winwindth -1 set the text width to match the window width ggVG select all gq reformat introducing hard breaks :wincmd w switch to the other window :let &tw=&...
Vivian De Smedt's user avatar
1 vote
Accepted

Neovim doesn't open previously unopen file in horizontal split

After much experimentation, classic vim sets nohidden by default. Neovim sets hidden by default. a set nohidden or lua equivalent fixed the issue.
webermaster's user avatar
1 vote

Unloaded buffers and the :ls! command

I would go for :h :ls for an explanation. In short, :ls! shows also unlisted buffers (:h unlisted-buffers) also available as a link from :h :ls: *...
Maxim Kim's user avatar
  • 13.5k
1 vote
Accepted

How to exclude a specific buffer from the BufEnter autocmd group?

So I found a solution which is to use the BufRead event, which doesn't affect dashboard for some reason. return { "your/plugin", event = "BufRead", }
Nias26's user avatar
  • 11
1 vote

How to force Vim to delete all the [No Name] buffers?

I also like to use Vim to edit my system clipboard, and I wrote a couple of blogposts about how I've configured my devices to streamline this. The basic idea is to use Vim's features to automate ...
Rich's user avatar
  • 32.1k
1 vote

How to force Vim to delete all the [No Name] buffers?

Turning my earlier comments into an answer to preserve them for future readers. Instead of creating a lot of unnamed buffers and cleaning them up later, a scratch buffer may be used to do back-of-the-...
Friedrich's user avatar
  • 2,125

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