about summary refs log tree commit diff
path: root/tools/emacs/config/init.el
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-16T03·49+0000
committerVincent Ambo <tazjin@google.com>2019-12-16T03·51+0000
commite99183427515af67ac97c64e22f286693ecbe060 (patch)
tree07effaeb53653dfa187aeb9682700d000c0f0ce0 /tools/emacs/config/init.el
parentd4f6c5a399e4202e57de572f7a7193f1537939d9 (diff)
feat(emacs.d): Install and configure emacs-libvterm
This incredible package provides a fully functional, libvterm based
terminal emulator inside of Emacs.

Killer feature: It's possible to switch the buffer into a full Emacs
text mode (read-only) for selections and such.
Diffstat (limited to 'tools/emacs/config/init.el')
-rw-r--r--tools/emacs/config/init.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/emacs/config/init.el b/tools/emacs/config/init.el
index 7d40813d83f0..06fe707921a4 100644
--- a/tools/emacs/config/init.el
+++ b/tools/emacs/config/init.el
@@ -73,6 +73,19 @@
 (use-package pg)
 (use-package restclient)
 
+(use-package vterm
+  :config (progn
+            (setq vterm-shell "/usr/bin/fish")
+            (setq vterm-exit-functions
+                  (lambda (&rest _) (kill-buffer (current-buffer))))
+            (setq vterm-set-title-functions
+                  (lambda (title)
+                    (rename-buffer
+                     (generate-new-buffer-name
+                      (format "vterm<%s>"
+                              (s-trim-left
+                               (s-chop-prefix "fish" title)))))))))
+
 ;;
 ;; Packages providing language-specific functionality
 ;;