Townk/vim-autoclose — Issue #25: Incompatibility with other plugins and <Enter> maps
Author: Townk
Created: 2012-02-23 18:38:42+00:00
State: open

I just receive this bug report by email and I don't want to loose track of it:
-------------------------------------------------------------------------
Whenever I use an auto-complete feature (the built-in VIM one or omnicppcomplete) an annoying effect appears: if the auto-complete popup is visible and I press to select the current option, the current option is inserted after the cursor (as should be), but, unfortunately, a carriage return is also inserted (as shouldn't be).

I have the following details:
If I disable autoclose, the carriage return is not inserted.
If I comment out the line inoremap =Enter() in CreateExtraMaps, the carriage return is not inserted, but this, of course, disables the really nice indentation of a {} block that you have implemented. At the moment, I am forced to live with this option as the insertion is much more distracting.
My understanding is that this behavior is a result of a misinteraction between autocomplete and supertab because without supertab, the default behavior for vim is to insert the carriage return after hitting enter. However, supertab adds the nice functionality of just completing the selection on and I would like to keep that if possible.
-------------------------------------------------------------------------