Code Monkey home page Code Monkey logo

awesome-tab's Introduction

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)
  1. If you are using Use-package, the configuration will look like this
(use-package awesome-tab
  :load-path "path/to/your/awesome-tab"
  :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
awesome-tab-move-current-tab-to-beg Move current tab to the first position
awesome-tab-select-visible-tab Select visible tab with given index
awesome-tab-ace-jump Jump to visible tab with 1 or 2 characters press

Tip: When jumping to a tab far away, think if it will be frequently used. If the answer is yes, move it to the first position. By doing so you keep all your frequently used tabs to be in the first screen, so you have easy access to them.

AceJump

Call command awesome-tab-ace-jump, and a sequence of 1 or 2 characters will show on tabs in the current tab group. Type them to jump to that tab.

Customize awesome-tab-ace-keys to specify the used characters. The default value is j, k, l, s, d, f. Notice that this variable has the custom-set attribute, so setq won't work. Use customize-set-variable instead.

Customize awesome-tab-ace-str-style to specify the position of ace sequences on the tab. You can choose 'replace-icon, 'left or 'right.

Customize awesome-tab-ace-quit-keys to specify keys used to quit from ace jumping. The default value is '(?\C-g ?q ?\s), you can press C-g q or SPC to quit from ace jumping. Anyway, you can customize any other keys you like.

(setq awesome-tab-ace-quit-keys '(?\C-g))

If you are a hydra user, you can use this to do consecutive moves between tabs and windows:

(defhydra awesome-fast-switch (:hint nil)
  "
 ^^^^Fast Move             ^^^^Tab                    ^^Search            ^^Misc
-^^^^--------------------+-^^^^---------------------+-^^----------------+-^^---------------------------
   ^_k_^   prev group    | _C-a_^^     select first | _b_ search buffer | _C-k_   kill buffer
 _h_   _l_  switch tab   | _C-e_^^     select last  | _g_ search group  | _C-S-k_ kill others in group
   ^_j_^   next group    | _C-j_^^     ace jump     | ^^                | ^^
 ^^0 ~ 9^^ select window | _C-h_/_C-l_ move current | ^^                | ^^
-^^^^--------------------+-^^^^---------------------+-^^----------------+-^^---------------------------
"
  ("h" awesome-tab-backward-tab)
  ("j" awesome-tab-forward-group)
  ("k" awesome-tab-backward-group)
  ("l" awesome-tab-forward-tab)
  ("0" my-select-window)
  ("1" my-select-window)
  ("2" my-select-window)
  ("3" my-select-window)
  ("4" my-select-window)
  ("5" my-select-window)
  ("6" my-select-window)
  ("7" my-select-window)
  ("8" my-select-window)
  ("9" my-select-window)
  ("C-a" awesome-tab-select-beg-tab)
  ("C-e" awesome-tab-select-end-tab)
  ("C-j" awesome-tab-ace-jump)
  ("C-h" awesome-tab-move-current-tab-to-left)
  ("C-l" awesome-tab-move-current-tab-to-right)
  ("b" ivy-switch-buffer)
  ("g" awesome-tab-counsel-switch-group)
  ("C-k" kill-current-buffer)
  ("C-S-k" awesome-tab-kill-other-buffers-in-current-group)
  ("q" nil "quit"))

where my-select-window is a command that automatically recognizes the number in your keystroke and switch to that window. Below is an implementation using ace-window:

;; winum users can use `winum-select-window-by-number' directly.
(defun my-select-window-by-number (win-id)
  "Use `ace-window' to select the window by using window index.
WIN-ID : Window index."
  (let ((wnd (nth (- win-id 1) (aw-window-list))))
    (if wnd
        (aw-switch-to-window wnd)
      (message "No such window."))))

(defun my-select-window ()
  (interactive)
  (let* ((event last-input-event)
         (key (make-vector 1 event))
         (key-desc (key-description key)))
    (my-select-window-by-number
     (string-to-number (car (nreverse (split-string key-desc "-"))))))))

SwitchTabByIndex

You can bind the number keys to the command awesome-tab-select-visible-tab, such as s-1, s-2, s-3 ... etc.

(global-set-key (kbd "s-1") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-2") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-3") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-4") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-5") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-6") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-7") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-8") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-9") 'awesome-tab-select-visible-tab)
(global-set-key (kbd "s-0") 'awesome-tab-select-visible-tab)

This function automatically recognizes the number at the end of the keystroke and switches to the tab of the corresponding index.

Note that this function switches to the visible range, not the actual logical index position of the current group.

To show the current index on tabs, set awesome-tab-show-tab-index to non-nil. You can also change its format by customizing awesome-tab-index-format-str.

Plugins

If you're a helm fan, you need to add below code in your helm config,

(awesome-tab-build-helm-source)

Ivy fans can use the awesome-tab-counsel-switch-group function instead.

Customize

Icon

If you have install AllTheIcons successfully. AwesomeTab will render file icon in tab automatically.

If you dislike icon render in tab and still need use all-the-icons plugin, you can set variable awesome-tab-display-icon with nil.

Theme

Tab color will change with current theme, you don't need customize the color tab.

Emacs may not detect your theme style (light/dark) in the terminal correctly. You may need to set frame-background-mode manually to have correct tab (and text) colors:

(when (not (display-graphic-p))
  (setq frame-background-mode 'dark))

or you like light theme more:

(when (not (display-graphic-p))
  (setq frame-background-mode light))

You can customize terminal tab face by below options:

  • awesome-tab-terminal-dark-select-background-color
  • awesome-tab-terminal-dark-select-foreground-color
  • awesome-tab-terminal-dark-unselect-background-color
  • awesome-tab-terminal-dark-unselect-foreground-color
  • awesome-tab-terminal-light-select-background-color
  • awesome-tab-terminal-light-select-foreground-color
  • awesome-tab-terminal-light-unselect-background-color
  • awesome-tab-terminal-light-unselect-foreground-color
HideRules

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

Default hide function is awesome-hide-tab

(defun awesome-tab-hide-tab (x)
  (let ((name (format "%s" x)))
    (or
     (string-prefix-p "*epc" name)
     (string-prefix-p "*helm" name)
     (string-prefix-p "*Compile-Log*" name)
     (string-prefix-p "*lsp" name)
     (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.

GroupRules

Awesome tab use awesome-tab-buffer-groups-function to control tab group. Default group function is awesome-tab-buffer-groups

(defun awesome-tab-buffer-groups ()
  "`awesome-tab-buffer-groups' control buffers' group rules.

Group awesome-tab with mode if buffer is derived from `eshell-mode' `emacs-lisp-mode' `dired-mode' `org-mode' `magit-mode'.
All buffer name start with * will group to \"Emacs\".
Other buffer group by `awesome-tab-get-group-name' with project name."
  (list
   (cond
    ((or (string-equal "*" (substring (buffer-name) 0 1))
         (memq major-mode '(magit-process-mode
                            magit-status-mode
                            magit-diff-mode
                            magit-log-mode
                            magit-file-mode
                            magit-blob-mode
                            magit-blame-mode
                            )))
     "Emacs")
    ((derived-mode-p 'eshell-mode)
     "EShell")
    ((derived-mode-p 'emacs-lisp-mode)
     "Elisp")
    ((derived-mode-p 'dired-mode)
     "Dired")
    ((memq major-mode '(org-mode org-agenda-mode diary-mode))
     "OrgMode")
    (t
     (awesome-tab-get-group-name (current-buffer))))))

This function is very simple switch logic, you can write your own code to group tabs.

FixedWidth

If you'd like all the tab labels using the same length, such as 14, use:

(setq awesome-tab-label-fixed-length 14)
DisplayFunctionName

If the implementation of the function where the cursor is located is longer than the screen, it is difficult to know what the current function.

You can set variable awesome-tab-display-sticky-function-name with t, then function name will display in current tab.

Default this feature is disable.

ShowTabIndex

If you want show index in tab, you can use below setting:

(setq awesome-tab-show-tab-index t)

You can also display a personalized index by change option awesome-tab-index-format-str

AdjustTabHeight

You can use below code adjust tab height:

(setq awesome-tab-height 150)
AdjustTabContrast

If you think the contrast between the label is too low, can lower both values, increase the contrast:

awesome-tab-dark-unselected-blend and awesome-tab-light-unselected-blend

AdjustActiveBar

You can customize active bar with change awesome-tab-active-bar-width and awesome-tab-active-bar-height

awesome-tab's People

Contributors

akikaede6 avatar alaiyeshi025 avatar amaikinono avatar casouri avatar claritystorm avatar et2010 avatar firstlovelife avatar ibnishak avatar jixiuf avatar klausweiss avatar levindu avatar loyalpartner avatar manateelazycat avatar rw21 avatar syohex avatar twlz0ne avatar wcq062821 avatar xlshiz avatar xwl avatar zw963 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-tab's Issues

mac iTerm2下无法切换tab

  (dotimes (tabnum 10)
    (global-set-key
     (kbd (concat "M-" (number-to-string tabnum)))
     'awesome-tab-select-visible-tab))

但是切换的时候会报错,已经将“option”按键设置为“+ESC”了

progn: Buffer is read-only: #<buffer *Backtrace*>
awesome-tab-select-visible-tab: Wrong type argument: stringp, nil

如下所示为describle-key的描述信息。

M-1 runs the command awesome-tab-select-visible-tab (found in
global-map), which is an interactive compiled Lisp function in
‘awesome-tab.el’.

It is bound to ESC 0..9.

(awesome-tab-select-visible-tab)

Bind this function with number keystroke, such as s-1, s-2, s-3 ... etc.

This function automatically recognizes the number at the end of the keystroke
and switches to the tab of the corresponding index.

Note that this function switches to the visible range,
not the actual logical index position of the current group.

一些小问题

((run-hook-with-args-until-success 'awesome-tab-inhibit-functions)

awesome-tab-inhibit-functions 这个变量 重命名之后 这块逻辑受影响吧

emacs 27上报找不到insert-after这个函数

GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.2.0, NS appkit-1671.20 Version 10.14.3 (Build 18D109))
Error in post-command-hook (awesome-tab-adjust-buffer-order): (void-function insert-after)

emacs刚启动不显示tabbar

Emacs刚启动时tabbar没有出现,打开新文件也没出现,只有在用awosome的函数(比如awosome-tab-forward)切换buffer后才出现。

刚启动

切换后

我的配置

(use-package awesome-tab
  :straight (awesome-tab
	     :type git
	     :host github
	     :repo "manateelazycat/awesome-tab")
  :config
  (setq awesome-tab-style 'slant
	awesome-tab-cycle-scope 'tabs)
  (awesome-tab-mode t)
  :bind* (("s-<left>"  . awesome-tab-backward)
	  ("s-<right>" . awesome-tab-forward)
	  ("s-<up>"    . awesome-tab-forward-group)
	  ("s-<down>"  . awesome-tab-backward-group))
  )

How to ignore buffers in tabs?

User may want to exclude specific buffers with regex from tabs.

I noticed there is a variable called awesome-tab-hide-tab-rules, but I didn't see where it is used.

awesometab-hide does not work for readonly buffers

Thanks for the great library. I really enjoy using the tabs. I have one small issue though:
I've set the awesome-hide-tab function to hide all buffers starting with a *. But it looks like read-only buffers still show tabs starting with a *, such as the *Agenda Commands* buffer when I call org-agenda in org-mode or the *NeoTree* buffer when I call neotree. Can this problem be solved? The following is my awesome-hide-tab function.

(defun awesome-tab-hide-tab (x)
    (let ((name (format "%s" x)))
      (or
       (string-prefix-p "*" name)
       (string-prefix-p "COMMIT_EDITMSG" name)
       (and (string-prefix-p "magit" name)
            (not (file-name-extension name))))))

Why this package isn't in melpa?

I'm really interested in this package, I would like to contribute to it and add features like all the icons integration. There isn't really any decent tab plugins for Emacs so if this package gets to mature well it could become a really really useful tool

切换buffer时,如果此buffer A与切换前的buffer B 是同一个group,能否把A 挪到B 之后

这个思路不知道成不成熟
切换buffer时,如果此buffer A与切换前的buffer B 是同一个group,能否把A 挪到B 之后,
这样我想回到原buffer时,只需要awesome-tab-backward即可
这个思路有些类似于 1cc31c3 这次的提交(Open new tab on right of current one)

或者干脆 每次刷新tab列表的时候,直接按(buffer-list)的倒序重建当前group内的buffer 列表,
这样,当前buffer 始终处于列表的最后一个,而倒数第2个则为我上次访问的buffer,

当然也可以正序排,则当前buffer始终处于列表的第1位

Tab line - - - - - - pattern

Where in the code is established this "- - - - - - - - - " pattern? I don't quite like it and want to remove it

invalid-function awesome-tab-kill-buffer-match-rule

I have installed the package using use-package. After a restart of Emacs, when I open a lot of buffers and try to run awesome-tab-kill-all-buffers-in-current-group, I get the error message "invalid-function awesome-tab-kill-buffer-match-rule" with the following backtrace

Debugger entered--Lisp error: (invalid-function awesome-tab-kill-buffer-match-rule)
  awesome-tab-kill-buffer-match-rule(#f(compiled-function (buffer) #<bytecode 0x1ffcfe10f3f1>))
  awesome-tab-kill-all-buffers-in-current-group()
  funcall-interactively(awesome-tab-kill-all-buffers-in-current-group)
  call-interactively(awesome-tab-kill-all-buffers-in-current-group record nil)
  command-execute(awesome-tab-kill-all-buffers-in-current-group record)
  counsel-M-x-action("awesome-tab-kill-all-buffers-in-current-group")
  ivy-call()
  ivy-read("M-x " ("toggle-debug-on-error" "emacs-lisp-mode" "bookmark-set" "org-superstar-mode" "eval-buffer" "byte-recompile-file" "byte-recompile-directory" "awesome-tab-kill-match-buffers-in-current-group" ...) :predicate #f(compiled-function (x) #<bytecode 0x1ffcfcd9cff9>) :require-match t :history counsel-M-x-history :action counsel-M-x-action :keymap (keymap (67108908 . counsel--info-lookup-symbol) (67108910 . counsel-find-symbol)) :initial-input nil :caller counsel-M-x)
  counsel-M-x()
  funcall-interactively(counsel-M-x)
  call-interactively(counsel-M-x nil nil)
  command-execute(counsel-M-x)

Then I open the awesome-tab.el file and eval the buffer. I can run the awesome-tab-kill-all-buffers-in-current-group command normally.

I notice that the function awesome-tab-kill-buffer-match-rule is a macro instead of a function. Are there any ways to fix this macro so that I do not have to eval buffer everytime I start Emacs?

有些时候awesome-tab-line 会消耗很多资源

我的操作是 “Mark set", 选中原来越多的文本,但也就500+ 行,每一行字符也很少。 下面是profile 的结果。 有什么办法可以避免吗? 谢谢

 redisplay_internal (C function)                         289,584,646  88%
 - eval                                                   289,542,750  88%
  - awesome-tab-line                                      289,534,562  88%
   - cond                                                 289,534,562  88%
    - awesome-tab-current-tabset                          289,534,562  88%
     - and                                                289,534,562  88%
      - setq                                              289,534,562  88%
       - funcall                                          289,534,562  88%
        - awesome-tab-buffer-tabs                         289,534,562  88%
         - let                                            289,534,562  88%
          - awesome-tab-get-tabset                        289,534,562  88%
           - awesome-tab-buffer-update-groups             289,534,562  88%
            - let                                         289,534,562  88%
             - sort                                       288,572,066  88%
              - mapcar                                    288,570,592  88%
               - and                                      238,902,419  72%
                - funcall                                 238,902,419  72%
                 - awesome-tab-buffer-list                238,902,419  72%
                  - awesome-tab-filter                    238,902,419  72%
                   - delq                                 238,902,419  72%
                    - mapcar                              238,902,419  72%
                     + #<lambda 0xe24ccd0e>               237,944,685  72%
                       #<lambda 0x3e6e5c4fe>                    1,474   0%
               + #<lambda 0xf0233ec>                       49,668,173  15%
    if                                                          8,188   0%
 + linum-after-scroll                                          41,896   0%
+ command-execute                                          27,570,394   8%
+ linum-update-current                                      9,351,543   2%
+ rtags-post-command-hook                                   1,088,334   0%
+ timer-event-handler                                          79,100   0%
  internal-echo-keystrokes-prefix                              45,496   0%
+ ...

awesome-version: 1.7

不能只在当前分组循环切换标签

awesome-tab里面有个变量awesome-tab-scope可以控制只在当前分组循环切换标签还是在所有分组循环切换标签,可是无论设置成tabs还是groups好像都只能在所有分组中循环切换
(custom-set-variables '(awesome-tab-scope tabs))
这是我的设置方式

`ivy-switch-buffer-at-current-group` function

After a little, I always have many tabs in a group, I usually use ivy-switch-buffer to switch them, but most of the times I just switch in the current group, and I can switch group with awesome-tab-counsel-switch-group

Can provide some helper function like ivy-switch-buffer-at-current-group which had been filtered with the current group already.

Go back to previous buffer after killing particular buffers?

如题。有时我们用两个窗口对照着写代码,此时如果用一个 describe-xxx 系列的命令,另一边的窗口会被 *Help* buffer 占掉。kill 这个 buffer 以后,会切换到另一个 Emacs group 的 buffer 中,而我们希望它能自动回到原来看的代码中。那么是否可以增加一个自定义列表,使得该列表中的 buffer 被 kill 之后,自动回到之前的 buffer?

switch to nth tab

Maybe we can just make tab link and use ace-link?
Any plans about this?

awesome-tab does not work wiht Emacs Ipython Notebook

How to reproduce:
Install awesome-tab and EIN
Open a new notebook and your scrren should look something like:
image
If you run M-x awesome-tab-forward it looks something like:
image
Which is how it should look like.
If you run M-x awesome-tab-forward a second time it looks something like:
image
Which is suboptimal (because there is no longer a tabbar displayed), but still ok. But if you run M-x awesome-tab-forward a third time, it won't switch to the next tab.

Thoughts on rearranging tabs

It's good to have frequently used tabs clustering together. awesome-tab previously took the approach to move previous tab near current tab when jump to a tab far away, but this is often not the expected behavior.

Since we have awesome-tab-ace-jump now, it's convenient to jump between tabs in current screen. I suggest we create a command to move current tab to the first position, and the rearranging process will be like:

  • Occasionally we have to jump to a tab out of current screen. Use helm/ivy/built-in command to do this.
  • Move it to the first position.
  • As this goes on, most frequently used tabs will be in the first screen.

A "go to the first tab" command is also needed, such that when the user is not on first screen, and decide not to move current tab to the first position, he/she can go back to first screen quickly.


我们希望常用的 tab 能聚在一起。之前 awesome-tab 采用了「跳到较远的 tab 时,把前一个 tab 带过来」的机制,但这往往不是想要的。

现在我们有 awesome-tab-ace-jump 了,所以在一屏内的 tab 之间跳转都是很方便的。我建议做一个命令,把当前的 tab 移到第一个位置。重排的过程像是:

  • 偶尔我们需要跳到不在屏幕上的 tab,这可以用 helm/ivy/自带命令做到。
  • 把它移到第一位去。
  • 几次之后,最常用的 tab 都在第一屏之内了

我们还需要一个「回到第一个标签」的命令,这样如果用户不在第一屏,也不想把当前 tab 移到第一位,他可以快速返回第一屏。

Mouse Click on tab not working

Hi,
All seems to be working fine except that when I click on the tab I get the following error
Wrong type argument: window-live-p, nil
if I click on the small area just below the text (still on the tab....just) then it works fine but if I click anywhere else then I get the error and the tab doesn't change to another buffer. I am using windows 10 and emacs 26.3. I have all-the-icons.el along with the fonts which have been installed I also have memoize.el as this also seemed to be a requirement.
init.el is as below and no errors on startup

(require 'awesome-tab)
(require 'all-the-icons)
(setq inhibit-compacting-font-caches t)
(awesome-tab-mode t)

Any help appreciated thanks

void-function project-current

Error during redisplay: (eval (awesome-tab-line)) signaled (void-function project-current) [2 times]

不知道是不是对emacs 版本有要求呢,我的emacs 是24.4

Clickable tabs

Should tabs be clickable? Because clicking on tabs doesn't do anything.

TABs not showing despite I see place reserved for them

After pulling the latest version of awesome-tab they stopped working for me. I can see place for tabs reserved and my key-bindings still work, but tabs itself are invisible. I changed nothing in my configs and tested it on 2 laptops. One was a fresh install with my configs, another where I used and older version that worked. When I fetched it broke there as well.

(use-package awesome-tab
  :load-path
  (lambda () (concat user-emacs-directory "user-packages/awesome-tab/"))
  :init
  (require 'awesome-tab)
  :bind
  ("M-s-l" . awesome-tab-forward)
  ("M-s-j" . awesome-tab-backward)
  :config
  (setq awesome-tab-style "bar")
  (awesome-tab-mode t))

cond: Too many visible tabs

if a group had many tabs, trigger awesome-tab-ace-jump will cause cond: Too many visible tabs

when custom variable (setq awesome-tab-ace-keys '(?j ?k ?h ?g ?d ?f ))

it cause other error like cl-subseq: Bad bounding indices: 0, 20

I think the tabs should be truncated when the tabs size more then 16 (4*4)

Misbehavior / Vague documentation of awesome-tab-local-mode

awesome-tab-local-mode switches the visibility of the tabs in local buffer (since it makes buffer-local variable), but the documentation says "toggle local display of the tab bar", which I thought refers to the current window, and this is a more reasonable behavior in my opinion. The user should be thinking of current window when he/she calls this function, but when the same buffer appears on multiple windows in a screen, they are all affected. I think either the behavior or the documentation should be fixed.

awesome-tab切换到其它分组的buffer后改变了recent buffer的顺序?

有两组buffer,一个目录包括diredA, diredB, diredC,一个文件fileA, fileB, fileC。

不开启awesome-tab的正常情况下,current buffer为fileA,切换到diredC后,调用kill-buffer后,current buffer应该是原来的fileC。(因为按照顺序,fileC是最近打开的buffer)

但是,开启awesome-tab后,完成kill-buffer操作后,current buffer成了diredB。看起来此时最近打开的buffer默认设置到当前组里的buffer。

感觉这是awesome-tab改变了recent buffer的原因?这是设计如此吗?还是不小心在哪里改变了buffer-list?

Add a customizable variable for using all-the-icons or not?

Sometimes all-the-icons is loaded, but the user don't want awesome-tab to use it. For example, doom-modeline requires all-the-icons explicitly, but the icons won't show in terminal. The user can customize doom-modeline-icon to make the modeline doesn't show icons, but awesome-tab will try to show them anyway since all-the-icons is loaded. Can we have a variable to control this behavior?

face are not persistent

The custom-face works but restore to default after I switch buffer.
Please see examples below.


(use-package awesome-tab
  ;;https://github.com/manateelazycat/awesome-tab
  :load-path "~/.emacs.d/opt/awesome-tab/"
  :custom-face
  (awesome-tab-selected ((t (:background "#4a4c4d" :foreground "#e1d5bd" :height 80))))
  (awesome-tab-unselected ((t (:background "#333637" :foreground "#9c9179" :height 60))))

)

Symbol’s function definition is void: awesome-tab-separator-pattern-defun (Win 10, emacs 27)

When I byte complile aswsome-tab in Emacs -q, I got error message:

awesome-tab.el:1408:1:Error: Symbol’s function definition is void: awesome-tab-separator-pattern-defun

In GNU Emacs 27.0.50 (build 1, x86_64-w64-mingw32)
of 2019-06-30 built on
Repository revision: f24d47359d9b6621215f20795d585c5024d91783
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.15063
System Description: Microsoft Windows 10 Enterprise (v10.0.1703.15063.1868)

Melpa?

Hey, do you have any plans of releasing this to melpa?

我是不是弄错了什么?

当我在 customize 里面搜 awesome 的时候,就出现了这个。 似乎是哪儿遗漏了?

Debugger entered--Lisp error: (wrong-type-argument symbolp (t :inherit default))
  widget-convert(((t :inherit default)))
  custom-variable-value-create((custom-variable :tag "Awesome Tab Background Color" :value awesome-tab-background-color :custom-form edit))
  widget-apply((custom-variable :tag "Awesome Tab Background Color" :value awesome-tab-background-color :custom-form edit) :value-create)
  widget-default-create((custom-variable :tag "Awesome Tab Background Color" :value awesome-tab-background-color :custom-form edit))
  widget-apply((custom-variable :tag "Awesome Tab Background Color" :value awesome-tab-background-color :custom-form edit) :create)
  widget-create(custom-variable :tag "Awesome Tab Background Color" :value awesome-tab-background-color)
  #f(compiled-function (entry) #<bytecode 0x442af069>)((awesome-tab-background-color custom-variable))
  mapcar(#f(compiled-function (entry) #<bytecode 0x442af069>) ((awesome-tab-auto-scroll-flag custom-variable) (awesome-tab-background-color custom-variable) (awesome-tab-buffer-home-button custom-variable) (awesome-tab-button custom-face) (awesome-tab-button-highlight custom-face) (awesome-tab-cycle-scope custom-variable) (awesome-tab-default custom-face) (awesome-tab-highlight custom-face) (awesome-tab-home-button custom-variable) (awesome-tab-mode custom-variable) (awesome-tab-scroll-left-button custom-variable) (awesome-tab-scroll-right-button custom-variable) (awesome-tab-selected custom-face) (awesome-tab-separator custom-variable) (awesome-tab-separator custom-face) (awesome-tab-unselected custom-face) (org-drawer custom-face) (org-log-into-drawer custom-variable) (org-log-state-notes-insert-after-drawers custom-variable) (awesome-tab custom-group) (awesome-tab-buffer custom-group)))
  custom-buffer-create-internal(((awesome-tab-auto-scroll-flag custom-variable) (awesome-tab-background-color custom-variable) (awesome-tab-buffer-home-button custom-variable) (awesome-tab-button custom-face) (awesome-tab-button-highlight custom-face) (awesome-tab-cycle-scope custom-variable) (awesome-tab-default custom-face) (awesome-tab-highlight custom-face) (awesome-tab-home-button custom-variable) (awesome-tab-mode custom-variable) (awesome-tab-scroll-left-button custom-variable) (awesome-tab-scroll-right-button custom-variable) (awesome-tab-selected custom-face) (awesome-tab-separator custom-variable) (awesome-tab-separator custom-face) (awesome-tab-unselected custom-face) (org-drawer custom-face) (org-log-into-drawer custom-variable) (org-log-state-notes-insert-after-drawers custom-variable) (awesome-tab custom-group) (awesome-tab-buffer custom-group)))
  custom-buffer-create(((awesome-tab-auto-scroll-flag custom-variable) (awesome-tab-background-color custom-variable) (awesome-tab-buffer-home-button custom-variable) (awesome-tab-button custom-face) (awesome-tab-button-highlight custom-face) (awesome-tab-cycle-scope custom-variable) (awesome-tab-default custom-face) (awesome-tab-highlight custom-face) (awesome-tab-home-button custom-variable) (awesome-tab-mode custom-variable) (awesome-tab-scroll-left-button custom-variable) (awesome-tab-scroll-right-button custom-variable) (awesome-tab-selected custom-face) (awesome-tab-separator custom-variable) (awesome-tab-separator custom-face) (awesome-tab-unselected custom-face) (org-drawer custom-face) (org-log-into-drawer custom-variable) (org-log-state-notes-insert-after-drawers custom-variable) (awesome-tab custom-group) (awesome-tab-buffer custom-group)) "*Customize Apropos*")
  customize-apropos(("awe"))
  #f(compiled-function (widget &optional event) #<bytecode 0x4461ec29>)((editable-field :size 40 :help-echo "Search for custom items.\nYou can enter one or more..." :action #f(compiled-function (widget &optional event) #<bytecode 0x4461ec29>) :value "" :field-overlay #<overlay from 78 to 118 in *Customize Group: Emacs*> :from #<marker (moves after insertion) at 81 in *Customize Group: Emacs*> :to #<marker at 118 in *Customize Group: Emacs*>) nil)
  widget-apply((editable-field :size 40 :help-echo "Search for custom items.\nYou can enter one or more..." :action #f(compiled-function (widget &optional event) #<bytecode 0x4461ec29>) :value "" :field-overlay #<overlay from 78 to 118 in *Customize Group: Emacs*> :from #<marker (moves after insertion) at 81 in *Customize Group: Emacs*> :to #<marker at 118 in *Customize Group: Emacs*>) :action nil)
  widget-apply-action((editable-field :size 40 :help-echo "Search for custom items.\nYou can enter one or more..." :action #f(compiled-function (widget &optional event) #<bytecode 0x4461ec29>) :value "" :field-overlay #<overlay from 78 to 118 in *Customize Group: Emacs*> :from #<marker (moves after insertion) at 81 in *Customize Group: Emacs*> :to #<marker at 118 in *Customize Group: Emacs*>) nil)
  widget-field-activate(81)
  funcall-interactively(widget-field-activate 81)
  call-interactively(widget-field-activate nil nil)
  command-execute(widget-field-activate)

awesome-tab 和 flycheck 造成modeline 闪烁问题

blink

配置:

;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.

;; This buffer is for text that is not saved, and for Lisp evaluation.
;; To create a file, visit it with C-x C-f and enter text in its buffer.

(setq package-enable-at-startup nil)
(setq package-archives
      '(("org"          . "http://orgmode.org/elpa/")
	("gnu" . "http://elpa.gnu.org/packages/")
	("melpa"        . "https://melpa.org/packages/")
	("melpa-stable" . "http://stable.melpa.org/packages/")))

(package-initialize)

;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(require 'use-package)

(use-package awesome-tab
  :load-path "~/.emacs.d/.local/straight/repos/awesome-tab"
  :config
  (awesome-tab-mode))


(use-package doom-modeline
  :ensure t
  :config
  (doom-modeline-mode 1))

(use-package flycheck
  :ensure t
  :init
  (setq flycheck-emacs-lisp-load-path 'inherit)
  (setq flycheck-check-syntax-automatically '(save mode-enabled idle-buffer-switch))
  (setq flycheck-buffer-switch-check-intermediate-buffers t)
  (setq flycheck-display-errors-delay 0.25)
  :config
  (global-flycheck-mode))

复现方法:
开两个窗口,分别打开来个不同的 elisp 文件,
然后多按几次保存

Only show tabs in active window?

For people using modeline, buffer names are shown at the bottom of every window, so tabs are not needed for inactive windows. Is there anyway to do this?

A bug in function 'awesome-tab-line'

Problem

I have customization to hide tab bar in the specific buffer, such as '*Message*'

(require 'dash)
(add-to-list 'awesome-tab-inhibit-functions
             (lambda ()
               (or (member major-mode '(helm-major-mode
                                        help-mode
                                        debugger-mode
                                        compilation-mode))
                   (-filter (lambda (regex) (string-match regex (buffer-name)))
                            my--ignored-buffer-regex))))

When I open "*Message*" buffer, there still an empty header line, like below:

before

But if I move the cursor or click in this buffer, the header line will be gone immediately. On Mac OSX, this behavior may not be reproducible. The code in Reproduction can show the idea, it works on both Mac OSX and Linux.

Reproduction

I checked the function awesome-tab-line, this function has a statement (setq header-line-format nil). That means, when we filter buffers, the default header line will like below:

(setq-default header-line-format '(:eval ((lambda () (setq header-line-format nil)))))

I tested the code above, and the behavior is the same as the problem I met.

Environment

ArchLinux, Emacs 26.1

Feature request: make tab links work in dumb terminals

Hello, awesome-tab is ... awesome. Works great in cocoa build of emacs and it's helpful in dumb terminals too. One seeming deficit is that clicking tabs in dumb terminal does not cause awesome-tab to switch to the associated buffer.

It seems that this should be possible as given that, for example, the built-in emacs documentation has internal links that lead to different buffers.

Thank you.

awesome-tab不生效

更新了最新的版本,不知道为啥只有在你在group rule里面定义的org mode 、dir mode 、magic mode才能识别和使用awesome-tab.其他的模式和文件下都没办法识别(tab栏上面没有任何文件名字显示的) 。
我特意重新安装了。也没发解决这个问题】

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.