Bookmarks, Buffers and Windows in Doom Emacs

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 พ.ย. 2024

ความคิดเห็น • 60

  • @hlissner
    @hlissner 4 ปีที่แล้ว +99

    Hi! Your friendly neighborhood Doom guy again! You can resize the window in larger increments by prefixing the keybind with a number: `25 SPC w >` is equivalent to typing `SPC w >` 25 times.
    More useful than that may be the `SPC w |` and `SPC w _` keys. Prefix those with a number to resize the window to an exact size (horizontally and vertically, respectively).
    Alternatively, there's `SPC w o`, which zooms the current window (pushing aside all the others). Pressing it again restores them to their original sizes.
    Hope that helps! (Also, `SPC w` is aliased to `C-w` -- some folks seem to prefer that prefix)

    • @markus-sagen
      @markus-sagen 4 ปีที่แล้ว +1

      Awesome

    • @modaryaghi
      @modaryaghi 4 ปีที่แล้ว

      Hi, I am trying to get used to doom-emacs lately. Actually, I've been struggling with finding a way to adjust the frames as my needs, but just nothing what I got. I tried all your keybinds you suggested in your comments, all that I received is "can not resize the root window of a frame".

  • @kennymccormic7578
    @kennymccormic7578 4 ปีที่แล้ว +19

    I use DOOM emacs as my primary IDE and I could not be happier. I just love space as a leader key philosophy, and together with evil mode there isn't really any other editor or IDE could offer the same ergonomics. Also, in the insert mode I use regular emacs key bindings to move cursor back or forward with Ctrl+f and Ctrl+b without leaving the insert mode and reaching for arrow keys, which is INSANELY convenient. Doom Emacs is a closest thing to pure perfection!

  • @tamanebp
    @tamanebp 4 ปีที่แล้ว +32

    He touched the mouse! How scandalous!

  • @danielakhterov
    @danielakhterov 4 ปีที่แล้ว +29

    Hey, I'm a vim user myself, but I'm really interested in what emacs has to offer. It would be swell if you can do more videos like these.

    • @MrDadidou
      @MrDadidou 4 ปีที่แล้ว +6

      check out Magit. the git package of emacs. this alone is worth the switch

    • @markus-sagen
      @markus-sagen 4 ปีที่แล้ว +4

      Same! Org mode and Magit are real selling points

  • @AndersJackson
    @AndersJackson 4 ปีที่แล้ว +10

    Splits are windows, because they come from before you had graphical environment.
    And frames are what is called windows in a graphical environment.
    So Emacs Window is a split in a Emacs window.
    So Emacs Frame is a Emacs window.
    And it is reasonable if you remember that Emacs started where a 24x80 character terminal was all you had. :-)

  • @RushilKasetty
    @RushilKasetty 4 ปีที่แล้ว +1

    You are absolutely on a tear of new videos, one every day for several weeks

  • @vasiovasio
    @vasiovasio 4 ปีที่แล้ว +1

    Really useful video! Thank you Derek!

  • @dacritter8397
    @dacritter8397 4 ปีที่แล้ว +2

    Did you custom define spc-o-p to open the side pane dired? I don't have that. That jey sequence is undefined. If I hit spc-o the list pops up but there is no p in there. It's undefined.

  • @dkosmari
    @dkosmari 4 ปีที่แล้ว +1

    If you want my suggestion about what makes one never leave Emacs: code editing.
    I code mostly in C and C++, and find the ability to make Emacs format my code very useful. After adjusting c-auto-newline, c-cleanup-list, c-hanging-braces-alist, c-hanging-colons-alist, c-hungry-delete-key, c-offsets-alist, cua-mode (because Ctrl-C and Ctrl-V should always be for copy-paste), and installing some packages for company+rtags autocompletion... and then binding some keys like F7 to recompile under cc-mode... every other text editor feels raw, clumsy.

  • @AnzanHoshinRoshi
    @AnzanHoshinRoshi 4 ปีที่แล้ว +2

    Thank you, Derek.

  • @THIRSTYGNOME
    @THIRSTYGNOME 4 ปีที่แล้ว +4

    As Vim user I have been enjoying these windows into Emacs, keep them coming!
    Side note, did you try out Neovim? I am currently using it as my DD by aliasing vi to neovim. I personally haven't made up my mind on the politics/ideology between the two projects

  • @SenthilBabuji
    @SenthilBabuji 4 ปีที่แล้ว +3

    It is strange that doom Emacs don't have a transient state for resizing windows. But it should not be hard to configure.
    A transient state is a sub state where you can define different behavior for keys. For example you can configure 'SPC w r' to enter window resize transient state where your hjkl keys will resize windows until you press any other key to exit that transient state. That way you don't have to press 3 keys to just resize a bit.

  • @yousfisaad
    @yousfisaad 2 ปีที่แล้ว

    Hello, thanks for your videos...
    I have a trick to share with you, you can change the width of the frames using the keyboard, by writing a number of times to execute the 'adjuste command' for example, instead of typing 'space w >' 10 time, you can type 10 space w >
    this means repeate "space w >" 10 times

  • @jdiaz6
    @jdiaz6 4 ปีที่แล้ว +1

    You gotta post more on how to add plugins and such! please!

  • @AtomToast
    @AtomToast 4 ปีที่แล้ว

    This is nicely very familiar to a vim user. It's really mostly a reimplementation of vim in emacs together with emacs extensibility.
    The window shortcuts are the same in vim, just with ctrl instead of space.
    I do actually also have a bunch of buffer shortcuts similar to these set up due to my leader being space

  • @gulzarsingh3681
    @gulzarsingh3681 3 ปีที่แล้ว

    Amazing.
    Was looking for this navigation.
    One thing. If Tab bar is activated, sometimes the opened buffers don't show tab bar.

  • @devflanker9702
    @devflanker9702 3 ปีที่แล้ว

    Excellent !

  • @giorgiobraz3828
    @giorgiobraz3828 4 ปีที่แล้ว

    Amazing!!! Thank you so much for this! 🤓

  • @Noone-ig5ui
    @Noone-ig5ui 4 ปีที่แล้ว

    Is there spacemacs equivalent to select windows? Instead of using SPC w w or SPC w hjkl, you cant just do ALT + 1, ALT + 2.... I am now exploring doom, planning to switch. Thanks

  • @dkosmari
    @dkosmari 4 ปีที่แล้ว +4

    Quite a few of these are more convoluted than vanilla Emacs. "C-x 1", "C-x 2", "C-x 3", "C-x 0" does all the window splitting you'll need. Control + left click shows you a list of buffers, can also do "C-x C-b". "C-left", "C-right" switches between buffers. To navigate the focus through the windows, "C-Tab".
    I don't see the advantage of the weird keybiding in Doom Emacs.

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +1

      Honestly, even that is convoluted. Since the Vim bindings also work... :sp or :vs :D

    • @dkosmari
      @dkosmari 4 ปีที่แล้ว +1

      @@DistroTube But that's Evil!

    • @chrzan9608
      @chrzan9608 4 ปีที่แล้ว

      Modal editing is more ergonomic cos you don't have to stretch your hands to reach those Ctrl/Meta keys too much or nearly at all

    • @10cadr
      @10cadr 4 ปีที่แล้ว +1

      @@chrzan9608 thats what I thought when started using Emacs but got used to normal keybings really fast. Ctrl - x, C-c or Alt X arent that far apart tho.

    • @chrzan9608
      @chrzan9608 4 ปีที่แล้ว

      @@10cadr still i find the Emacs way too much of a stretch finger-wise

  • @reilly6187
    @reilly6187 4 ปีที่แล้ว

    ive never used vim or emacs as of yet, should i just try out emacs seeing as it is more comprehensive. Keep using nano for small things XD

  • @alex.graywolf
    @alex.graywolf 2 ปีที่แล้ว

    I was thinking... if emacs can be used as a WM, Can doom emacs contain a X program?

  • @binario4371
    @binario4371 4 ปีที่แล้ว

    Please do more tutorial about doom, there are actually just 1 (doomcast series). Specifically on orgmode agenda would be helpful, thanks!

  • @jissa028
    @jissa028 2 ปีที่แล้ว

    th-cam.com/video/F1iaskxcLNA/w-d-xo.html
    No need to use the mouse or type little by little.
    Just do: 10 SPC w > or 10 SPC w <
    This also works with the vim key bindings
    10 C-w <
    or
    10 C-w >

  • @ayushyadav5164
    @ayushyadav5164 3 ปีที่แล้ว

    SPC - o - p doesn't work for me!! help!

    • @ArnaudMEURET
      @ArnaudMEURET 3 ปีที่แล้ว

      The neotree module is disabled by default. You must uncomment its line in your doom/init.el then restart emacs.

    • @ayushyadav5164
      @ayushyadav5164 3 ปีที่แล้ว

      @@ArnaudMEURET oh!

  • @DJ_Cthulhu
    @DJ_Cthulhu 4 ปีที่แล้ว +2

    You're never going back to vim, I suspect 😁

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +2

      Well, with Doom I kinda have vim...in emacs.

    • @DJ_Cthulhu
      @DJ_Cthulhu 4 ปีที่แล้ว +1

      @@DistroTube Ah, so you are staying with Doom 😀

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +3

      I see no reason to leave Doom. ;)

    • @Gold_fi
      @Gold_fi 4 ปีที่แล้ว +1

      @@DistroTube Your channel is the reason I switched to linux, tnks for everything

  • @AndersJackson
    @AndersJackson 4 ปีที่แล้ว

    Doom Emacs, is it based on Space Emacs?
    You should cover Open-mode (great making notes and code in) and Magit, which is git support. Which alone are a reason to learn Emacs, with or without real or vi key bindings.
    For my configuration for original Emacs, have a look at: gitlab.com/anders-jackson-hig/emacs-init
    Notice, it is set up form my, but you could look at the org-file to generate the documentation. Just type C-c C-e h o to see it in a web browser.

  • @thengakola6217
    @thengakola6217 3 ปีที่แล้ว

    kill buffer :bd
    vert split :vsplit
    horz splt :split
    and many more are just like vim. You could do those instead of space and stuff

  • @haroldtrotter183
    @haroldtrotter183 4 ปีที่แล้ว +1

    I have the error 'SPC o p' is undefined. How to fix this?

    • @ArnaudMEURET
      @ArnaudMEURET 3 ปีที่แล้ว

      The neotree module is disabled by default. You must uncomment its line in your doom/init.el then restart emacs.

  • @zerocoll20
    @zerocoll20 4 ปีที่แล้ว

    i used to love emacs, but it is so slow in my windows that i give up.

    • @DistroTube
      @DistroTube  4 ปีที่แล้ว +8

      >but it is so slow in my windows
      Something tells me that this has less to do with emacs than it does with Windows.

    • @zerocoll20
      @zerocoll20 4 ปีที่แล้ว

      @@DistroTube yes, it's true. When i open it with WSL it runs well, but is a pain in the ass have to open WSL just do use EMACS, so i migrated to vim. If i compile emacs with clang it probably would performance better, but i hadn't tried it yet.

    • @dkosmari
      @dkosmari 4 ปีที่แล้ว

      @@zerocoll20 Did you try using the MSYS2 package?

    • @zerocoll20
      @zerocoll20 4 ปีที่แล้ว

      @@dkosmari yep, it's slow the same

    • @akshatvats7992
      @akshatvats7992 4 ปีที่แล้ว

      @@DistroTube Am switching from vim, Emacs is slow in my Arch too... Especially scrolling with the mouse

  • @otavioschwanck6668
    @otavioschwanck6668 4 ปีที่แล้ว +1

    Pure Emacs > Evil Mode

    • @Andrath
      @Andrath 4 ปีที่แล้ว +1

      Emacs is a nice OS, but the default editor sucks.

    • @otavioschwanck6668
      @otavioschwanck6668 4 ปีที่แล้ว

      @@Andrath i'm a ex-vim user, started on emacs with evil. After this, i've learned emacs keybindings with some plugins (like expand-region). Now i code much faster with only with emacs.

    • @Andrath
      @Andrath 4 ปีที่แล้ว

      @@otavioschwanck6668 Emacs keybindings give me carpal tunnel.

    • @otavioschwanck6668
      @otavioschwanck6668 4 ปีที่แล้ว

      @@Andrath its all personal preference, the important is use whatever you like.

    • @Andrath
      @Andrath 4 ปีที่แล้ว +1

      @@otavioschwanck6668 Can't argue with that. :)