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.
 
 
 

2.5 KiB

Terminal

Performing terminal interactions is a must-have for any modern editor. This module introduces two means of doing so with EShell1 and VTerm2.

Emacs Lisp shell

EShell1 is a fully POSIX compliant shell written entirely in Emacs Lisp. While not a traditional terminal emulator, it provides a native REPL for Emacs Lisp code with everything available in the environment.

  • Don't highlight the prompt

  • Favour use of system utilities

  • Open in the current buffer with SPC e

(setq eshell-highlight-prompt nil
      eshell-prefer-lisp-functions nil)

(dotfiles/leader "e" '(eshell :which-key "Shell"))

Prompt extras

Implement the lambda prompt for aesthetic purposes with the EShell Prompt Extras3 package.

(use-package eshell-prompt-extras
  :custom (eshell-prompt-function 'epe-theme-lambda))

Here's an example of what that looks like:

~/.emacs.d/modules:main*? λ

Interactive Terminal

EShell1 isn't enough when needing interactivity from the terminal. Going through Thinking in C++4 for one of my courses required lots of terminal interaction which Eshell1 was unable to handle. VTerm's2 based on an external C library which is blazing fast, and fully interactive.

  • Always compile the module

  • Open in the current buffer with SPC v

  • Install the required packages on Debian/Ubuntu

(use-package vterm
  :commands (vterm)
  :custom (vterm-always-compile-module t)
  :init (dotfiles/install "cmake libtool libtool-bin")
  :config (dotfiles/leader "v" '(vterm-other-window :which-key "Terminal")))

Resources