Emacs 中的 goto 文件 [英] goto-file in Emacs

查看:25
本文介绍了Emacs 中的 goto 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

emacs 中是否有 vi "gf" 命令的替代品?意思是尝试打开当前光标下的文件如果确实存在真实的文件名.

Is there a substitute in emacs for the vi "gf" command? meaning try to open the file which is under the cursor right now if a real file name is in fact there.

谢谢

推荐答案

您需要 find-file-at-point 函数(也就是 ffap 的别名).默认情况下它不绑定到一个键,但你可以使用

You want the find-file-at-point function (which is also aliased to ffap). It's not bound to a key by default, but you can use

M-x ffap

或者,你可以放入你的 .emacs 文件:

Or, you can put in your .emacs file:

(ffap-bindings)

这将用基于 ffap 的版本替换许多普通的 find-file 键绑定(如 C-x C-f).详情请参阅 ffap.el 中的评论.

This will replace many of the normal find-file key bindings (like C-x C-f) with ffap-based versions. See the commentary in ffap.el for details.

这篇关于Emacs 中的 goto 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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