最近试用了 QEmacs,真的很快哟。
另,在 C-x C-f 输入部分文件名后再按 TAB 会弹出一个小窗,类似 neovim 。
打开 dired后,文件会自动预览,不需要安装像 Ranger 这样的插件。
更好玩的是,它的插件是用C语言的。像这样:
/*
* Simple plugin example
*/
#include "qe.h"
/* insert 'hello' at the current cursor position */
static void insert_hello(EditState *s)
{
s->offset += eb_insert_str(s->b, s->offset, "Hello world\n");
}
static const CmdDef my_commands[] = {
CMD2( "insert-hello", "C-c h",
"Insert the string Hello world\\n",
insert_hello, ES, "*")
};
static int my_plugin_init(QEmacsState *qs) {
/* commands and default keys */
qe_register_commands(qs, NULL, my_commands, countof(my_commands));
return 0;
}
qe_module_init(my_plugin_init);
有人使用过它吗?来交流一下体验呀!
![]()
其实我有点想研究一下它的源代码(核心代码5万行),毕竟第一作者是Fabrice Bellard。 然后写个插件玩玩。
