有没有办法在 vim 中为 Perl 启用代码完成? [英] Is there any way to enable code completion for Perl in vim?

查看:37
本文介绍了有没有办法在 vim 中为 Perl 启用代码完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

令人惊讶的是,当您熟练使用 vim 时,您的编码速度甚至可以比 Eclipse 等标准 IDE 更快.但我真正怀念的一件事是代码完成,尤其是对于长变量名和函数.

Surprisingly as you get good at vim, you can code even faster than standard IDEs such as Eclipse. But one thing I really miss is code completion, especially for long variable names and functions.

有什么办法可以在 vim 中为 Perl 启用代码完成吗?

Is there any way to enable code completion for Perl in vim?

推荐答案

Ctrl-P (Get Previous Match) and Ctrl-N(获取下一个匹配)是一种伪代码完成.他们基本上搜索您正在编辑的文件(向后搜索 Ctrl-P,向前搜索 Ctrl-N)(和任何打开的缓冲区,如果你在你的 TAG 文件中使用 TAGS 任何东西)对于以你正在输入的内容开头的单词,并添加一个下拉列表.即使它不是智能感知,它对于变量和函数名称也非常有效.通常我使用 Ctrl-P 作为我正在寻找的变量或函数通常在代码后面.此外,如果您保持 Vim 的相同副本打开,它将搜索您之前打开的文件.

Ctrl-P (Get Previous Match) and Ctrl-N (Get Next Match) are kind of pseudo code completion. They basically search the file (Backwards for Ctrl-P, Forwards for Ctrl-N) you are editing (and any open buffers, and if you are using TAGS anything in your TAG file) for words that start with what you are typing and add a drop down list. It works surprisingly well for variables and function names, even if it isn't intellisense. Generally I use Ctrl-P as the variable or function I am looking for is usually behind in the code. Also if you keep the same copy of Vim open, it will search the files you have previously opened.

这篇关于有没有办法在 vim 中为 Perl 启用代码完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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