diff options
| author | Ankit Pandey <anpandey@protonmail.com> | 2023-04-19 23:25:59 -0700 |
|---|---|---|
| committer | Axel Forsman <axelsfor@gmail.com> | 2023-08-28 15:42:42 +0200 |
| commit | d6d2e5d2b170eb0ab3bec488868702009a0ee3b6 (patch) | |
| tree | 3bd72440fb94359583fdea766fd1641d8c679975 /evil-commands.el | |
| parent | 657af37c5570caab487e9e73d7b95696437e664d (diff) | |
tabs: Go to nth tab when tab-next is prefixed
This emulates the behavior of vim, where {N}gt goes to the Nth tab,
but {N}gT goes back N tabs.
Diffstat (limited to 'evil-commands.el')
| -rw-r--r-- | evil-commands.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/evil-commands.el b/evil-commands.el index 3d625a7..2198a0c 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -4782,6 +4782,18 @@ and redisplay the current buffer there." :repeat nil (evil-move-window 'below)) +;;; Tab commands + +(evil-define-command evil-tab-next (arg) + "Switch to the next tab. +If ARG is non-nil, parse ARG as an index and go to the tab at that +index." + :repeat nil + (interactive "<c>") + (if arg + (tab-bar-select-tab arg) + (tab-bar-switch-to-next-tab))) + ;;; Mouse handling ;; Large parts of this code are taken from mouse.el which is |
