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?

  • 7890yuiop@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 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.