enricozb / tabs.kak

Kakoune buffers as tabs in the status line.
26 stars 3 forks source link
kakoune plugin

tabs.kak

View open buffers in status line, like tabs, and navigate between them quickly.

Demo

asciicast

Keybindings

The recommended key bindings can be set by calling tabs-recommended-keys:

define-command tabs-recommended-keys -docstring "set the recommended kak-tabs bindings" %{
  map global normal q b
  map global normal Q B
  map global normal b ': enter-user-mode tabs<ret>' -docstring 'tabs'
  map global normal B ': enter-user-mode -lock tabs<ret>' -docstring 'tabs (lock)'
}

Within the tabs mode, the keybindings are as follows:

a: ↔ (alternate)      return to the previously focused buffer
h: ← (previous)       navigate to the buffer on the left
l: → (next)           navigate to the buffer on the right
s:   (*scratch*)      open the *scratch* buffer
u:   (*debug*)        open the *debug* buffer
H: ← (drag left)      swap this buffer to the left
L: → (drag right)     swap this buffer to the right
d:   (delete current) delete the current buffer

Configuration

Example Configuration

set-option global tabs_modelinefmt '%val{cursor_line}:%val{cursor_char_column} {{mode_info}} '
set-option global tabs_options --minified

Options

Installation

  1. Install the rc/tabs.kak so your kakoune instance auto-loads it.
  2. Install the kak-tabs rust crate.

TODO


Originally inspired by Delapouite's kakoune-buffers.

Warning This plugin is incompatible with powerline.kak, see here for why.