Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there any way to restore an unlisted buffer in Vim and send it back to the list of buffers?

For example:

:ls!
  1# "one.txt"
  2% "two.txt"
  3u "three.txt"

Can I send the third buffer back to the list?

:ls
  1# "one.txt"
  2% "two.txt"
  3  "three.txt"
share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

Switch to your unlisted buffer and reset the 'buflisted' option:

:buf 3
:set buflisted
share|improve this answer
add comment

Or, another way:

:badd three.txt
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.