refactor(emacs-pkgs/term-switcher): un-dash term-switcher.el
The builtin `seq' has everything I need, and this way bpalmer will be less annoyed. Change-Id: Ic8e5ac07d5214f36d77e9b577a3f805cdf89f220 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9146 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
4b4ec86114
commit
561a9fa45b
1 changed files with 5 additions and 5 deletions
|
@ -5,16 +5,16 @@
|
|||
;;
|
||||
;; Author: Vincent Ambo <tazjin@tvl.su>
|
||||
;; Version: 1.1
|
||||
;; Package-Requires: (dash ivy s vterm)
|
||||
;; Package-Requires: (ivy s vterm)
|
||||
;;
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This package adds a function that lets users quickly switch between
|
||||
;; different open vterms via ivy.
|
||||
|
||||
(require 'dash)
|
||||
(require 'ivy)
|
||||
(require 's)
|
||||
(require 'seq)
|
||||
(require 'vterm)
|
||||
|
||||
(defgroup term-switcher nil
|
||||
|
@ -45,11 +45,11 @@
|
|||
"Switch to an existing vterm buffer or create a new one."
|
||||
|
||||
(interactive)
|
||||
(let ((terms (-map (lambda (b) (cons (buffer-name b) b))
|
||||
(-filter #'ts/is-vterm-buffer (buffer-list)))))
|
||||
(let ((terms (seq-map (lambda (b) (cons (buffer-name b) b))
|
||||
(seq-filter #'ts/is-vterm-buffer (buffer-list)))))
|
||||
(if terms
|
||||
(ivy-read "Switch to vterm: "
|
||||
(cons "New vterm" (-map #'car terms))
|
||||
(cons "New vterm" (seq-map #'car terms))
|
||||
:caller 'ts/switch-to-terminal
|
||||
:preselect (s-concat "^" term-switcher-buffer-prefix)
|
||||
:require-match t
|
||||
|
|
Loading…
Reference in a new issue