将 VIM 插件添加到 Janus 设置中

发布于 2024-10-14 06:57:56 字数 384 浏览 7 评论 0原文

我最近转而使用一组自定义 vim 插件和 .vimrc 中的 Janus。我真的很喜欢这个设置,但我缺少的一件事是 Ruby 中块的自动完成。

例如,当我输入:

def method <enter>

它会完成该块:

def method
  # cursor here
end

我正在使用 Tim Pope 的一些插件,但不记得哪个插件提供了该功能(也许是 Rails?) 有没有一种方法可以使用 Janus 获得此功能?有人不想要这个吗?看来拥有真的很方便。

I recently switched over to using Janus from a custom set of vim plugins and .vimrc. I'm really enjoying the setup, but one thing I'm missing is the automatic completion of blocks in Ruby.

For example, when I type:

def method <enter>

It would complete the block:

def method
  # cursor here
end

I was using some of Tim Pope's plugins and can't recall which one provided the functionality (Rails maybe?) Is there a way to get this functionality using Janus? Is there a reason why someone wouldn't want this? It seems really convenient to have.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

暮年慕年 2024-10-21 06:57:57

根据 janus 文档 文档

如果你想添加其他 Vim 插件,你可以通过添加 ~/.janus.rake 来实现,例如所以:

vim_plugin_task "zencoding", "git://github.com/mattn/zencoding-vim.git"
vim_plugin_task "minibufexpl", "git://github.com/fholgado/minibufexpl.vim.git"

然后 ant 只需运行 rake 或在 ~/.vim 上运行 rake 来设置您设置的插件,例如:

rake zenconding

According to janus documentation documentation:

If you want to add additional Vim plugins you can do so by adding a ~/.janus.rake like so:

vim_plugin_task "zencoding", "git://github.com/mattn/zencoding-vim.git"
vim_plugin_task "minibufexpl", "git://github.com/fholgado/minibufexpl.vim.git"

ant then just run rake or run rake for the pluging you setup, on ~/.vim, for example:

rake zenconding
不回头走下去 2024-10-21 06:57:57

你说的是endwise

想必您可以将此存储库添加到 Janus rakefile 中,但我还没有测试过。这可能不包含在 Janus 中,因为这几乎可以用 Janus 中包含的 snipMate 来模拟。

You're talking about endwise.

Presumably you could just add this repo to the Janus rakefile, however I've not tested. This is likely not included in Janus because this can pretty much be emulated with snipMate which is included in Janus.

琉璃繁缕 2024-10-21 06:57:57

janus 自定义文档 目前建议使用 ~/.janus 目录作为 vim 插件。

您可以使用 git clone 将 vim 插件安装到 ~/.janus 目录中。例如

cd ~/.janus
git clone https://github.com/vim-scripts/Rename2.git rename2

,使用 rakefile 进行自定义的旧方法位于未维护的 单独分支 中。

The janus customization documentation currently reccommends using the ~/.janus directory for vim plugins.

You can use git clone to install vim plugins into the ~/.janus directory. E.g.

cd ~/.janus
git clone https://github.com/vim-scripts/Rename2.git rename2

The old method for customization, using rakefile is in a separate branch that is not maintained.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文