gt/gT = add goto Nth tab behavior
As it does in vim.
This commit is contained in:
parent
a2871e68ed
commit
ea80826fd2
2 changed files with 20 additions and 2 deletions
|
@ -447,8 +447,8 @@ directives. By default, this only recognizes C directives.")
|
||||||
:n "]w" #'+workspace/switch-right
|
:n "]w" #'+workspace/switch-right
|
||||||
:n "[w" #'+workspace/switch-left)
|
:n "[w" #'+workspace/switch-left)
|
||||||
(:when (featurep! :ui tabs)
|
(:when (featurep! :ui tabs)
|
||||||
:n "gt" #'centaur-tabs-forward
|
:n "gt" #'+tabs:next-or-goto
|
||||||
:n "gT" #'centaur-tabs-backward)
|
:n "gT" #'+tabs:previous-or-got)
|
||||||
|
|
||||||
;; custom vim-unmpaired-esque keys
|
;; custom vim-unmpaired-esque keys
|
||||||
:m "]#" #'+evil/next-preproc-directive
|
:m "]#" #'+evil/next-preproc-directive
|
||||||
|
|
18
modules/ui/tabs/autoload.el
Normal file
18
modules/ui/tabs/autoload.el
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
;;; ui/tabs/autoload.el -*- lexical-binding: t; -*-
|
||||||
|
;;;###if (featurep! :editor evil)
|
||||||
|
|
||||||
|
;;;###autoload (autoload '+tabs:next-or-goto "ui/tabs/autoload" nil t)
|
||||||
|
(evil-define-command +tabs:next-or-goto (index)
|
||||||
|
"Switch to the next tab, or to INDEXth tab if a count is given."
|
||||||
|
(interactive "<C>")
|
||||||
|
(if current-prefix-arg
|
||||||
|
(centaur-tabs-select-visible-nth-tab current-prefix-arg)
|
||||||
|
(centaur-tabs-forward)))
|
||||||
|
|
||||||
|
;;;###autoload (autoload '+tabs:previous-or-goto "ui/tabs/autoload" nil t)
|
||||||
|
(evil-define-command +tabs:previous-or-goto (index)
|
||||||
|
"Switch to the previous tab, or to INDEXth tab if a count is given."
|
||||||
|
(interactive "<C>")
|
||||||
|
(if current-prefix-arg
|
||||||
|
(centaur-tabs-select-visible-nth-tab current-prefix-arg)
|
||||||
|
(centaur-tabs-backward)))
|
Loading…
Add table
Add a link
Reference in a new issue