逛 reddit 的时候看到有人又搞了一个 libvterm

大家可以去 github 上下载下来玩玩,主页说现在还处于 alpha-release , 所以功能啊,稳定性啊可能都会有些不足吧

emacs-libvterm

主页上有编译步骤,不过记得先安装 libvterm-dev 相关的包,否则的话编译会报缺少 vterm.h

git clone https://github.com/akermu/emacs-libvterm.git
cd emacs-libvterm
mkdir -p build
cd build
cmake ..
make

编译成功后会在 emacs-libvterm 目录下生成一个 vterm-module.so 文件, 然后记得在配置文件里把 emacs-libvterm 目录加到 load-path 里,之后 (require 'vterm) 就可以使用了。

对了,最重要的一点是你的 emacs 已经支持了 modules 功能

./autogen.sh 
./configure --with-modules
make
sudo make install

PS: 好像不是又,还是之前那个。以为之前的那个没人开发了,所以看到有人开发了就以为是新的了 :joy:

哈哈, 最近在fork这个项目,准备给加上 滚屏的功能。

只是c语言功力不足, 希望更多的人来添砖加瓦 可以参照neovim的实现

3 个赞

github repo 链接有问题,直接点击不是 url 。

恩,感谢,已经修正了

估计是按 org link 的顺序来写 md link 了吧,哈哈

非常感谢,终于遇到一个趁手的term了。

在这之前,我用了ansi-term, multi-term,它们和zsh,fish之间兼容的不是很好,总是有一些难以接受的毛病。

有个小问题,如何改提示符的背景色和前景色? 06

README里有下面这段话

;; Set the `:foreground` and `:background` attributes of the following faces to a
;; color you like:

;; - vterm-color-default-fg
;; - vterm-color-default-bg
;; - vterm-color-black-fg
;; - vterm-color-black-bg
;; - vterm-color-red-fg
;; - vterm-color-green-bg
;; - vterm-color-green-fg
;; - vterm-color-yellow-bg
;; - vterm-color-blue-fg
;; - vterm-color-blue-bg
;; - vterm-color-magenta-fg
;; - vterm-color-magenta-bg
;; - vterm-color-cyan-fg
;; - vterm-color-cyan-bg
;; - vterm-color-white-fg
;; - vterm-color-white-bg

我用下面的写法试了一下,没有反应,正确改法是什么样的?

(custom-set-faces
  '(vterm-color-default-bg ((t (:background "green" :foreground "red")))))

设置 ansi-color-names-vector。最近几次更新,color设置方面改了好几次,可能后面还会变。

1 个赞

好的,多谢!非常喜欢用libvterm,我会持续跟进。