如何使用Emacs自动完成/片段?

时间:2012-10-30 11:19:02

标签: emacs configuration autocomplete code-snippets emacs24

我一直在使用emacs-live,这太棒了!

我只是无法弄清楚如何使用自动完成/片段,弹出的建议,你可以循环选项,但你如何选择一个选项。

我尝试了很多东西来应用选择,似乎什么都没有用,这让我发疯了。

有人可以帮帮我吗?

1 个答案:

答案 0 :(得分:1)

我似乎通过拉动最新版本的配置来解决问题。不知道我改变了什么或改变了但现在它正在运作。

我在附近找到了一个manual插件:

### Summary ###

Completion will be started by inserting characters. After completion is started,
operations in the following table will be enabled temporarily. After completion
is finished, these operations will be disabled.

| Key       | Command     | Description               |
|-----------|-------------|---------------------------|
| TAB, C-i  | ac-expand   | Completion by TAB         |    
| RET, C-m  | ac-complete | Completion by RET         |
| down, M-n | ac-next     | Select next candidate     |
| up, M-p   | ac-previous | Select previous candidate |
| C-?, f1   | ac-help     | Show buffer help          |

To stop completion, simply use `C-g`.