Closing a buffer
If you like to keep your buffer list tidy, you can use the :buffer-close command — or its short alias :bc — to remove a buffer from the list. It closes the current buffer and drops you into the one you were in last.
And don’t worry — if you try to close a buffer that has unsaved changes, Helix will stop you from proceeding.
Work through the checklist below. Open a.txt and close it again from inside the buffer, then do the same with b.txt, this time using the alias. Both closes land you back in exercise.txt.
Note
:buffer-close also takes a path, so you can close a buffer without switching to it first. On this site, give it the full path the statusline shows — :buffer-close /work/b.txt — because the browser build resolves the argument without the working directory.