如何配置emacs自动完成路径像vim? [英] How to configure emacs to have it complete the path automatically like vim?

查看:101
本文介绍了如何配置emacs自动完成路径像vim?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经是vim用户了好几年了。现在我想尝试Emacs的一些原因。我在Vim中使用路径自动完成功能(C-c,C-f)。所以我想知道Emacs中是否有类似的按键?我已经google了这个问题,但只能找到这个答案 https://超级用户。 com / questions / 67170 / how-do-i-complete-file-paths-in-emacs 。然而,与提供我一个候选名单的vim不同,Emacs自动完成第一个候选人。所以,我的问题是如何配置HippieExpand,让它提供一个候选人列表,而不是自动完成第一个候选人。

解决方案

我不知道如何自定义HippieExpand来执行此操作,但您可能需要查看 auto完整的包。这是很容易设置,并提供完成作为一个下拉列表。它也是非常可定制的,所以你可以调整它的行为完全像你喜欢的。希望你觉得它有用!



编辑:我只是意识到你正在寻找路径完成不是一般的自动完成。在这种情况下,auto-complete.el可能会过度杀伤。仍然我建议你看看它,因为它提供了很多附加的实用程序。我第二次看看ido的路径完成。


I have been a vim user for several years. Now I want to try Emacs for some reasons. I use the path auto-completition functionality(C-c, C-f) a lot in Vim. So I am wondering if there are any similar keystrokes in Emacs ? I have googled this question but only find this answer https://superuser.com/questions/67170/how-do-i-complete-file-paths-in-emacs .However, unlike vim which provides me a list candidate, Emacs completes the first candidate automatically. So, my question is How to configure HippieExpand to make it provide me a list of candidates instead of completing the first candidate automatically ?

解决方案

I'm not sure how to customize HippieExpand to do this, but you might want to take a look at the auto-complete package. It's fairly easy to set up and offers completion as a drop-down list. It's also very customizable so you can tweak it to behave exactly like you'd prefer. Hope you find it useful!

Edit: I just realized you were looking just for path completion not auto-completion in general. In that case auto-complete.el might be overkill. Still I do suggest that you take a look at it as it offers a lot of added utility. I second taking a look at ido for path-completion.

这篇关于如何配置emacs自动完成路径像vim?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆