this post was submitted on 13 Nov 2023
1 points (100.0% liked)

Emacs

311 readers
3 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

I'm a noob (of nearly 3 years using emacs).

Buffer / window management still confuses me.

I haven't really learned to use / position / switch windows and buffers. Simply because I used to one org-mode window most of the time.

Now I'm using org-roam, amd dealing with multiple small files, I keep getting stuck in silly situations, like ending up with:

  • a roam buffer and my fallback buffer vertically stacked - when I want to "fullscreen" the window with the roam buffer, I can't delete or kill the fallback window / buffer.

  • two fallback buffers vertically stacked. Neither of which I can kill or delete.

Is there a good guide somewhere?

top 1 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 11 months ago

A couple of simple config suggestions:

(winner-mode 1) ;; Get familiar with `winner-undo'.
(global-set-key (kbd "C-x !") 'delete-other-windows-vertically)

I get a lot of mileage out of those two.

Also consider adding bindings for these, to tell the following command where to display its buffer:

  • windmove-display-left
  • windmove-display-right
  • windmove-display-up
  • windmove-display-down
  • windmove-display-same-window

And the regular windmove commands are very convenient for moving between buffers.

The transpose-frame package available in MELPA is useful. Note that with only two windows, rotate-frame is "exchange the positions of the windows", and transpose-frame is "switch between vertical and horizontal split". I have those bound to C-c | and C-c \ respectively, and use them regularly.