Emacs package to provide out-of-the-box configuration to use tabs.
Branch: master
Clone or download
Pull request Compare This branch is 4 commits ahead of manateelazycat:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
README.md
awesome-tab.el
screenshot.png

README.md

Table of Contents

What is it?

Emacs package to provide out-of-the-box configuration to use tabs.

Installation

  1. Clone this repository
git clone --depth=1 https://github.com/manateelazycat/awesome-tab.git
  1. Move awesome-tab.el to your load-path.

The load-path is usually ~/elisp/.

It's set in your ~/.emacs or ~/.emacs.d/init.el like this:

(add-to-list 'load-path (expand-file-name "~/elisp"))
(require 'awesome-tab)
(awesome-tab-mode t)

If you are using Use-packge, the configuration will look like this

(use-package awesome-tab
  :load-path "path/to/your/awesome-tab.el"
  :config
  (awesome-tab-mode t)
)
  1. Reload your emacs configuration using M-x eval-buffer or restarting emacs

Usage.

Command Description
awesome-tab-switch-group Switch awesome-tab group by ido fuzz match
awesome-tab-select-beg-tab Select first tab of current group
awesome-tab-select-end-tab Select last tab of current group
awesome-tab-forward-tab-other-window Select next tab in other window
awesome-tab-backward-tab-other-window Select previous tab in other window
awesome-tab-backward-tab Select the previous available tab
awesome-tab-forward-tab Select the next available tab
awesome-tab-backward-group Go to selected tab in the previous available group
awesome-tab-forward-group Go to selected tab in the next available group
awesome-tab-backward Select the previous available tab, depend on setting of awesome-tab-cycle-scope
awesome-tab-forward Select the next available tab, depend on setting of awesome-tab-cycle-scope
awesome-tab-kill-other-buffers-in-current-group Kill other buffers of current group
awesome-tab-kill-all-buffers-in-current-group Kill all buffers of current group
awesome-tab-kill-match-buffers-in-current-group Kill buffers match extension of current group
awesome-tab-keep-match-buffers-in-current-group Keep buffers match extension of current group
awesome-tab-move-current-tab-to-left Move current tab to left
awesome-tab-move-current-tab-to-right Move current tab to right

If you're helm fans, you need add below code in your helm config:

(awesome-tab-build-helm-source)

Then add helm-source-awesome-tab-group in helm-source-list

Customize

Option Description
awesome-tab-background-color Background color of awesome-tab
awesome-tab-selected Active tab color
awesome-tab-unselected Inactive tab color

Awesome tab hide some tabs with regular expression that controller by function awesome-tab-hide-tab-function

(defun awesome-tab-hide-tab-function (x)
  (let ((name (format "%s" x)))
    (and
     (not (string-prefix-p "*epc" name))
     (not (string-prefix-p "*helm" name))
     (not (string-prefix-p "*Compile-Log*" name))
     (not (string-prefix-p "*lsp" name))
     (not (and (string-prefix-p "magit" name)
               (not (file-name-extension name))))
     )))

Tab will hide if awesome-tab-hide-tab-function return t, you can write your own code to customize hide rules.