代码之家  ›  专栏  ›  技术社区  ›  kaligne

编辑文件时幻灯片自动完成

  •  2
  • kaligne  · 技术社区  · 10 年前

    我是Lisp的新手。我在一个盒子里安装了LIsp来学习CommonLisp。在 slime-repl 我可以使用tab键自动完成。然而,我想在其他缓冲区-文件-我编辑中这样做。例如,我希望执行以下操作:

    C-x b  ;; Here I switch to the buffer corresponding to my file. S I am not in the repl anymore.
    (remove-i  ;; Here I use the tab key, but nothing occurs.
    

    在repl缓冲区中,我可以键入 (remove-i 我将看到匹配的函数,例如 remove-if remove-if-not .

    如何在编辑任何其他文件时添加lisp自动完成?

    1 回复  |  直到 10 年前
        1
  •  6
  •   Peter    10 年前
    C-M-i (translated from <M-tab>) runs the command slime-complete-symbol (found
    in slime-mode-indirect-map), which is an interactive compiled Lisp function in
    ‘slime.el’.
    
    It is bound to C-c TAB, C-M-i, <menu-bar> <SLIME> <Complete Symbol>.
    
    (slime-complete-symbol)
    
    Complete the symbol at point.
    
    Completion is performed by ‘slime-completion-at-point-functions’.
    

    如果需要,可以将此函数绑定到TAB。

    彼得