0

I'm trying to make a plugin that hide and show a terminal window on the bottom of the window, but i can't find a reliable way to hide a specific buffer, i tried using hide but you only can hide by count, and not by window number or name.

  • 1
    Could you use :h getbufinfo() to get the windows in which the buffer is shown and either hide all of them or use :h gettabinfo() to get the windows in the current tab and close only the window intersecting the buffer in the current tab? – statox Aug 6 at 8:41
  • how can i clone close only the window intersecting the buffer in the current tab? – Cássio Ribeiro Aug 6 at 10:15
  • Welcome to Vi and Vim! I wonder if you're mixing up buffers and windows here... :hide will hide a window by count, the window numbers are determined depending on their positions. On the other hand, there's buffer numbers (those shown by :ls), maybe you want to refer to those? There's for example :bd to "delete" (essentially hide?) a buffer by its buffer number... – filbranden Aug 6 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.