emacs - Emacs 中的全行补全?

标签 emacs

如何在 Emacs 中获得全行补全,类似于 Vim 的 CTRL-x l ?

例如,在 Vim 中,如果我输入:

from d<CTRL-X>-l

我会得到一个这样的弹出窗口:

vim line completion popup

它显示了在开放缓冲区中匹配该前缀的所有行。

最佳答案

这没有提供可供选择的列表(尝试为此调整 autocomplete),但会给出“感觉”。

(defun my-expand-lines ()
  (interactive)
  (let ((hippie-expand-try-functions-list
         '(try-expand-line)))
    (call-interactively 'hippie-expand)))

(define-key evil-insert-state-map (kbd "C-x C-l") 'my-expand-lines)

关于emacs - Emacs 中的全行补全?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17928467/

相关文章:

emacs - 从 Racket REPL 更改输出打印样式

html - 使用 emacs/HTML 模式可以进行正向/反向链接吗?

linux - “C-s C-w”不起作用 - Emacs

emacs - 组织模式下的表格没有边框

emacs - 打开 org 模式文件时,Eval 源代码会阻塞。

linux - emacs 中的串行终端

emacs - 如何高亮 `nlinum-mode`中的当前行号

debugging - 使用 GDB 在 Fortran 中调试 MPI 程序(在 MAC 上)

python - 在 emacs 中从 virtualenv 指定 python 解释器

emacs - 如何告诉 org 模式使用什么注释语法?