gvol / tabgo.el

avy-like jumper for tab-bar and tab-line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tabgo.el

Go to tab, avy style.

https://user-images.githubusercontent.com/8031017/223504769-2e5feed5-28a9-4343-b543-18b36005bc08.gif

Installation

You’ll need to download the package and add it to your load-path. Once you’ve done that, you can load the package with (require 'tabgo).

Alternatively, you can use the straight or quelpa package managers in conjunction with use-package.

To use quelpa, add the following code to your Emacs configuration:

(use-package tabgo
  :ensure t
  :quelpa (tabgo :fetcher github :repo "isamert/tabgo.el"))

If you prefer straight, use the following code instead:

(use-package tabgo
  :ensure t
  :straight (:host github :repo "isamert/tabgo.el"))

Usage

To use tabgo, bind the tabgo function to a key of your choice:

(bind-key "M-t" #'tabgo)

Once you have bound tabgo, you can call it by pressing the key you bound it to. You’ll see that highlighted characters appear on the tab-bar and tab-line tab names. Simply press the one that you want to go to and tabgo will switch to it for you.

There are also tabgo-line and tabgo-bar functions that you can use, tabgo is simply combination of these functions.

Customization

tabgo comes with two customizable variables that allow you to bind specific keys to select tabs in the tab-line and tab-bar. These variables are:

tabgo-tab-bar-keys
keys to use for selecting tab-bar tabs.
tabgo-tab-line-keys
keys to use for selecting tab-line tabs.

You can customize these variables by setting them either as a string containing the characters you want to use or as a list of characters.

Limitations

  • tabgo does not highlight tabs if there are no keys left in the tabgo-tab-bar-keys or tabgo-tab-line-keys. This is intentional because I want to have keys to appear in a deterministic way.
  • If you have tab-bar-auto-width set to a non-nil value, tabgo distorts the length of the tabs in the selection phase. I was not able to get around this, PR’s are welcome.

About

avy-like jumper for tab-bar and tab-line

License:GNU General Public License v3.0


Languages

Language:Emacs Lisp 100.0%