I don’t know if this is really an issue, but still it is one for me. I’m currently using Janus and I’m thinking to switch to spf13.
When editing a ruby source file, I tried to create a new method. When hitting enter after def method_name I was expecting to have the block automatically completed (with end) as Janus does.
So far I only found documentation of vim-ruby saying that Shift+Enter should do the trick, but here it gives me an error (related to completion it seems).
Anyone knows how to enable this behavior?
Thank you! :)
You are looking for Bundle 'tpope/vim-endwise'
Make your Ruby bundle look like this
if count(g:harsh_bundle_groups, 'ruby')
let g:rubycomplete_buffer_loading = 1
"let g:rubycomplete_classes_in_global = 1
"let g:rubycomplete_rails = 1
The OmniComplete settings creats some havoc with this. You end up inserting pubvisible()... after hitting enter unless you change the mapping for it. Which is fine but you do have to comment out this line in .vimrc to make this work:
"inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<CR>"
Yeah I'll put something together. Do you want to remove the mapping altogether (I'm not certain what it actually does since tab is what completes things for me, the mapping's behaviour is awkward). The alternative is I can add a variable for not mapping CR for OmniComplete that can be used instead.
Don't remap <CR> for omnicomplete it causes issues
fixes issue #280
@Flink, have the fixes here resolved the issue? If so please close :)