I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

4 years ago
4 years ago
  1. #+TITLE: VTerm
  2. #+AUTHOR: Christopher James Hayward
  3. #+EMAIL: chris@chrishayward.xyz
  4. #+PROPERTY: header-args:emacs-lisp :tangle vterm.el :comments org
  5. #+PROPERTY: header-args :results silent :eval no-export :comments org
  6. #+OPTIONS: num:nil toc:nil todo:nil tasks:nil tags:nil
  7. #+OPTIONS: skip:nil author:nil email:nil creator:nil timestamp:nil
  8. VTerm is an implementation of libvterm for Emacs.
  9. * Setup
  10. Install the dependencies before loading the module.
  11. #+begin_src shell
  12. RUN apt install -y cmake libtool libtool-bin
  13. #+end_src
  14. * Config
  15. I noticed ~eshell~ wasn't enough when needing interactivity from the terminal. Going through [[https://chrishayward.xyz/notes/thinking-in-cpp/][Thinking in C++]] for one of my courses required lots of terminal interaction which ~eshell~ was unable to handle. Since ~vterm~ is based on ~libvterm~, an external C library, it's blazing fast and fully interactive. Add a few configurations:
  16. + Always compile the module
  17. + Install the required packages on *Debian/Ubuntu*
  18. #+begin_src emacs-lisp
  19. (use-package vterm
  20. :commands (vterm)
  21. :custom (vterm-always-compile-module t))
  22. #+end_src
  23. * Shortcuts
  24. Open a new ~vterm~ buffer with =SPC v=:
  25. #+begin_src emacs-lisp
  26. (dotfiles/leader
  27. "v" '(vterm-other-window :which-key "VTerm"))
  28. #+end_src
  29. * Footnotes