Organize Buffers Better: tab-bar-mode Explained | Emacs Tutorial

Поділитися
Вставка
  • Опубліковано 20 січ 2025

КОМЕНТАРІ • 13

  • @sebastianprehn
    @sebastianprehn Рік тому +1

    Thanks for the video! Didn't know this feature existed, and I've already found it quite nice for my existing setup.

    • @kenhuang-tech
      @kenhuang-tech  Рік тому

      My pleasure! The funny thing is that I also discovered tab-bar-mode accidentally by mistyping some keybinding and unleashed the magic.
      "What happened?!", I was like, and then use the lossage (C-h l) to get it out. And aftering some playing, I found it really powerful and yet simple to use. So here is the video.
      It made me wonder, Emacs is like a box of chocolate :)

  • @Jedlmind
    @Jedlmind Рік тому

    This is great! I also had no idea this was already in Emacs. Thank you making this!

  • @kenhuang-tech
    @kenhuang-tech  Рік тому

    Came up with below snippet to create a few tabs on startup:
    (dolist (name '("docs" "coding" "term"))
    (tab-bar-new-tab)
    (tab-bar-rename-tab name))

  • @realisticlevel2553
    @realisticlevel2553 5 місяців тому +1

    As a beginner, and because I am using a smaller screen most of the time, I would like to not use splits and use always tabs. Seems like Emacs forces me to use splits (e.g. C-x 4 f opens a new file in a new split).
    I came here looking for C-x t f :)
    Thanks a lot friend.

  • @Abn0rm4l
    @Abn0rm4l Рік тому +1

    What is the benefit of using tabs versus switching buffers using a fuzzy-finding auto complete package helm, ivy, etc?
    I personally remove visual tabs and use fuzzy search for all the editors that support doing so, like emacs, neovim and IndelliJ.

    • @kenhuang-tech
      @kenhuang-tech  Рік тому

      It's quite a personal taste. I think using tabs is a bit better if you need to have two or three multi-window layouts/tabs/frames (possibly one for a project) at the same time. If you only have to display a buffer, helm/ivy is perfectly fast and precise to switch buffers, I also use ivy-switch-buffer a lot :)

    • @__kvik
      @__kvik Рік тому +1

      tab-bar-mode in Emacs is not like usual tabs as seen pretty much anywhere else. They are about switching between saved window layouts rather than buffers, per se. However, a window in Emacs is associated with a buffer it is currently displaying so this buffer is saved along with the window layout, which probably makes the effect confusing to people used to usual tabs. Especially if they only use a single window, then the behavior is pretty much exactly like usual tabs. So, switching buffers the usual Emacs way with completions etc. is still what you do with tab-bar-mode, it's just giving you the ability to work with sort of "workspaces" of windows.

  • @付爽-u5j
    @付爽-u5j Рік тому

    chinglish

    • @kenhuang-tech
      @kenhuang-tech  Рік тому

      haha. Which parts sound like chinglish, BTW?

    • @Abn0rm4l
      @Abn0rm4l Рік тому +5

      Your English is perfectly understandable.

    • @kenhuang-tech
      @kenhuang-tech  Рік тому

      ​@@Abn0rm4lThanks❤ I knew that there were a lot of syntax problems in my speaking, hope I will improve it along the way.

    • @realisticlevel2553
      @realisticlevel2553 5 місяців тому

      @@kenhuang-tech I understood everything pretty good! :D