12 ms·
Magit is probably the easiest one for casual devs to appreciate. "M-x magit" get a nice list of the status of the files in the current branch. After you mark
by llm_thr 3y ago
Magit is probably the easiest one for casual devs to appreciate.
"M-x magit" get a nice list of the status of the files in the current branch.
After you mark which ones you want to keep by moving up and down pressing s(tage) u(nstage) you just press "c c" and write your commit message. Then you press P and your git repo is up to date.
At a previous job the head engineer flagged the number of commits I was making as an issue since I must be wasting a lot of time pushing incremental changes. When I showed him that it took me about as long to push changes to my branch as it did to save the file he was flabbergasted that one could use git without pain.
- geokon 3y ago> "M-x magit" get a nice list of the status of the files in the current branch. Except it will randomly split your frame and show up in a seemingly arbitrary location - often obscuring what you're working on. I find the whole layout system in Emacs completely chaotic. I guess it comes with the flexibility (VS a fixed system like most Ides) nor do I have any particular solution in mind I'm curious if anyone has tamed the weird inconsistencies of how new frames (or is it windows? Can never keep the terms straight) pop up. For instance a CIDER error buffer shows up using some completely different black magic than magit
- zelphirkalt 3y agoThere is definitely a system to it. Something like "split at the longest side of the current window" or so. I have developed a feeling for where my magit buffer will show up. 95% of the time I am right and my eyeballs already move where it will appear. Anyway, if you want to get rid of some window/undo a split: C-x 0.
- pluijzer 3y agoI have my Emacs setup to never split anything and just use the whole frame (window). That also goes for things like helm. Instead of splitting I prefer to open multiple frames and let my window manager, manage them. This really improved my workflow.
- bjoli 3y agoSame here, but I let most things replace the current buffer. Magit always fills the frame though.
- geokon 3y agoHow do I go about doing this ? Seems potentially workable. Youd just jump back to the last buffer a lot of time, but that's quick and intuitivr.
- pluijzer 3y ago(setq display-buffer-base-action '(display-buffer-same-window))
- geokon 3y agothank you ! I'll see how it goes. Hope it won't be too wonky. Ex: In Magit when committing it now first shows a "changes" buffer that you have to kill and then you can get to the buffer where you write the commit message. Not a biggie but prolly breaks the original UI design
- yaantc 3y agoThis thread is on the "Mastering Emacs" book and from its author, on the topic of mastering Emacs window managements you can read this: https://www.masteringemacs.org/article/demystifying-emacs-window-manager https://www.masteringemacs.org/article/demystifying-emacs-wi... To be honest I've never played with this part of Emacs. The way I use it I'm fine with the default. But if not it's possible to take control of Emacs internal windows management.
- unhammer 3y agoFor magit, I like having it display full screen (deleting other windows), and then on quitting restore to the windows/splits I had before: (setq magit-display-buffer-function 'magit-display-buffer-fullframe-status-topleft-v1) (setq magit-bury-buffer-function 'magit-restore-window-configuration) For more general display-buffer tweaks, OP has a whole article on it https://www.masteringemacs.org/article/demystifying-emacs-window-manager https://www.masteringemacs.org/article/demystifying-emacs-wi... (though for display-buffer I just stick to the defaults myself, never tried CIDER)
- chewxy 3y agoAdd something like this? (add-to-list 'display-buffer-alist '("\\*Magit*\\*" (display-buffer-reuse-window display-buffer-in-direction (direction . bottom) (window . root) (inhibit-same-window . t)))*