当在Vim中插入模式,有没有办法添加文件路径自动完成? [英] When in Vim insert mode, is there a way to add filepath autocompletion?

查看:364
本文介绍了当在Vim中插入模式,有没有办法添加文件路径自动完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了很多shell脚本,我经常具有文件路径进入。我想知道如果任何人的方式知道要获得Vim的自动完成文件路径,而在插入模式,只是当你在你最喜欢的shell,选项卡来完成的目录或文件的路径一样。

I write a lot of shell scripts and I am constantly having to enter in filepaths. I am wondering if anyone knows of a way to get Vim to autocomplete filepaths while in insert mode, just like when you are in your favorite shell you tab to complete the path of the directory or file.

额外的信用,如果你能得到<大骨节病> CTRL <大骨节病> D 壳到Vim中插入模式的功能(即查看哪些文件/目录是在当前路径下)。

Extra credit if you can get CTRLD functionality of the shell into Vim insert mode (i.e. to see what files/directories are in the current path).

推荐答案

有关文件名全后,您可以使用:

For file name omni completion, you can use:

<大骨节病>控制 - <大骨节病> X <大骨节病>控制 - <大骨节病>˚F

Ctrl-XCtrl-F

这篇关于当在Vim中插入模式,有没有办法添加文件路径自动完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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