如何在不创建新行的情况下选择SuperTab完成建议? [英] How to select SuperTab completion suggestion without creating new line?
本文介绍了如何在不创建新行的情况下选择SuperTab完成建议?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在SuperTab的弹出建议中按Enter键时,它会在插入的关键字的末尾自动创建一个新行.
When I hit Enter on SuperTab's popup suggestion, it automatically creates a new line at the end of the inserted keyword.
是否可以在SuperTab弹出窗口中选择一个选项而无需创建新行?
Is it possible to select an option in the SuperTab popup without creating a new line?
更具体地说,我是否可以将space
配置为选择代码完成建议的方法?
More specifically, is there a way for me to configure space
as the method of selecting the code completion suggestion?
推荐答案
inoremap <expr> <Space> pumvisible() ? "\<C-y>" : " "
请注意接受当前选定选项的<C-y>
,您可能希望直接使用它而不是重新映射空间.您将在:h popupmenu-keys
中看到更多内容.
Note the <C-y>
that accepts currently selected option, you may want to use it directly instead of remapping space. You will see more in :h popupmenu-keys
.
这篇关于如何在不创建新行的情况下选择SuperTab完成建议?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文