Vim 中的自动完成方法结构 [英] Autocomplete method structure in Vim

查看:52
本文介绍了Vim 中的自动完成方法结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道是否有办法在 Vim 中自动完成一个方法?对于 Ruby 中的示例,如果我输入:

Does anyone know if there's a way to autocomplete a method in Vim? For an example in Ruby, if I type:

def my_method

然后回车,它会填入end并将光标移动到x所在的位置:

and hit Enter, it would fill in the end and move the cursor to where the x is:

def my_method
  x
end

推荐答案

vim-endwise这个(我很高兴它没有卸载它,所以我想这甚至是一种认可).

vim-endwise does this (I've been happy enough with it to not uninstall it, so I guess that's an endorsement even).

这篇关于Vim 中的自动完成方法结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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