/tabgo.el

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

Primary LanguageEmacs LispGNU General Public License v3.0GPL-3.0

tabgo.el

https://melpa.org/packages/tabgo-badge.svg

Go to tab, avy style.

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

Installation

tabgo is available through MELPA. If you have it set up already, just do M-x package-install tabgo and you are good to go. Otherwise please see MELPA getting started page to learn how you can install packages through MELPA or see the following installation options.

Another way to install tabgo would be using either straight or quelpa package managers:

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

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

Yet another option is just downloading tabgo.el file and putting into your load-path, afterwards you can simply do the following in your init.el:

(require 'tabgo)

Usage

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

(define-key global-map (kbd "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 (which is the default), you may experience a slight shift on tab widths while tabgo highlighting is active. Please take a look at the discussion on #2 to understand why this happens.