Autoclose plugin breaks abbreviations expansion

67 views
Skip to first unread message

Matteo Riva

unread,
Sep 5, 2012, 9:37:43 AM9/5/12
to vim...@googlegroups.com
I have installed the vim autoclose plugin[1] which is quite useful but
due to the remapping of <Space> now insert mode abbreviations aren't
expanded anymore (must do it with CTRL-]).

Is it possible to have both functionalities together?


[1] http://www.vim.org/scripts/script.php?script_id=2009

Christian Brabandt

unread,
Sep 5, 2012, 9:49:38 AM9/5/12
to vim...@googlegroups.com
Are you sure it is autocloses fault? This plugin doesn't remap <space>
for me.

regards,
Christian

Matteo Riva

unread,
Sep 5, 2012, 9:54:16 AM9/5/12
to vim...@googlegroups.com
On Wed, Sep 5, 2012 at 3:49 PM, Christian Brabandt <cbl...@256bit.org> wrote:
> Are you sure it is autocloses fault? This plugin doesn't remap <space>
> for me.

It does (line 456 of plugin/AutoClose.vim):

inoremap <buffer> <silent> <Space> <C-R>=<SID>Space()<CR>

also if I disable the plugin, abbreviations work fine.

Christian Brabandt

unread,
Sep 5, 2012, 10:00:15 AM9/5/12
to vim...@googlegroups.com
This must be a differen AutoClose plugin not the one you mentioned
in your first message:
http://www.vim.org/scripts/script.php?script_id=2009

This only has 189 lines (and doesn't remap <space>).

regards,
Christian

Matteo Riva

unread,
Sep 5, 2012, 10:06:34 AM9/5/12
to vim...@googlegroups.com
On Wed, Sep 5, 2012 at 4:00 PM, Christian Brabandt <cbl...@256bit.org> wrote:
> This must be a differen AutoClose plugin not the one you mentioned
> in your first message:
> http://www.vim.org/scripts/script.php?script_id=2009
>
> This only has 189 lines (and doesn't remap <space>).

You are right, there are apparently two plugins with that name and I'm
using this one: https://github.com/Townk/vim-autoclose

I might try the other one, although the automatic insertion of space is
nice.

Christian Brabandt

unread,
Sep 5, 2012, 10:13:51 AM9/5/12
to vim...@googlegroups.com
I have no access to github currently, but you could open an issue
at github, requesting that the mapping of space should always prepend a
<c-]> to expand abbreviations (this needs at least patch 7.3.489, otherwise
it is quite un-useful).

regards,
Christian

Reply all
Reply to author
Forward
0 new messages