8

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.

Peter Brown
  • 50,956
  • 18
  • 113
  • 146

3 Answers3

9

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
Adrian Kosmaczewski
  • 7,956
  • 4
  • 33
  • 59
Marcos Oliveira
  • 1,697
  • 1
  • 14
  • 13
  • Does this work anymore? I'm not able to find that rake task. The only reference to plugin I found in Janus doc is installing the plugin in ~/.janus folder, but I'm having trouble getting that to work too. – sent-hil Aug 06 '12 at 23:50
  • Can you expand on this? The instructions are very difficult for me to follow. It looks like their docs are saying make a file called .janus.rake in your home directory (~) and in that file simply write those lines. Then what? – netpoetica Sep 27 '12 at 00:47
  • I've being using Vundle (https://github.com/gmarik/vundle) these days instead of Janus. – Marcos Oliveira Nov 27 '13 at 00:14
6

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.

stevendaniels
  • 2,992
  • 1
  • 27
  • 31
  • 3
    haven't gotten that to work, the directory is there but it doesn't seem to take effect, trying to install zencoding – daedelus_j Jul 23 '13 at 20:06
  • 2
    or even a way to debug this would be nice – daedelus_j Jul 23 '13 at 20:27
  • 2
    Note: Plugins must be added within a containing directory as would be done by the git commands above, and not the bare my_plugin.vim file (as would be done in with Vim in `~/.vim/plugin/)`. Ex. `~/.janus/vim-gnupg/plugin/gnupg.vim`, not `~/.janus/gnupg.vim`. – Bradley Flood Jan 13 '15 at 23:40
6

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.

Randy Morris
  • 39,631
  • 8
  • 69
  • 76
  • Thanks! I tried snipMate but it's not exactly what I want so I put endwise in ~/.vim/plugin. That did the trick, but what I'll probably end up doing is just forking Janus and adding this. – Peter Brown Jan 26 '11 at 19:38