New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Commit 6ba6b56 breaks DelimitMate 'delimitMateBackspace' plugin functionality #2696
Comments
@micbou I think we should do something like https://github.com/tpope/vim-endwise/blob/master/plugin/endwise.vim#L113-L116 where if the key is already mapped we just concatenate the actions and do both of them; and maybe we should also check if |
@vheon Thanks for the link. I implemented a similar approach in this branch. It seems to work fine with the DelimitMate plugin. @davidsierradz Could you try it out? |
@davidsierradz As a workaround you could try using auto-pairs. I'm using it and didn't stumble upon this problem. |
@micbou, downloaded and tested the branch, I think its working good, thanks. |
@micbou Any advances in merging this fix to upstream? |
Anybody who wanted to use this feature can just
|
Sorry for the lack of answer. I am not really satisfied with the solution because it adds the imap <BS> <Plug>YcmOnDeleteChar<Plug>delimiteMateBS where In the meantime, a workaround is to add the following to your vimrc: imap <silent> <BS> <C-R>=YcmOnDeleteChar()<CR><Plug>delimitMateBS
function! YcmOnDeleteChar()
if pumvisible()
return "\<C-y>"
endif
return ""
endfunction |
DelimitMate with YCM does not work properly, for example <BS> does not delete the closing parenthesis. See ycm-core/YouCompleteMe#2696 for more details.
@davidsierradz we've changed the YCM completion implementation in #3645 could you try that PR and see if it resolves this issue ? I don't use any of these plugins delimit plugins. |
@puremourning I arrived here because of this issue. I updated YouCompleteMe and looks like delimitMate backspace works as intended without work arounds. |
Great thanks. |
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your issue:
[Frequently Asked Questions][faq] section.
about to report and couldn't find an answer to my problem. ([Example Google
search.][search])
vim --version
.:YcmDebugInfo
.the
:YcmToggleLogs
command.version) I am using.
my issue, including what I expected to happen and what actually happened.
of
install.py
(orcmake
/make
/ninja
) including its invocationthat any help I receive is a selfless, heartfelt gift of their free time. I
know I am not entitled to anything and will be polite and courteous.
actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
Issue Details
By the 'delimitMateBackspace' functionality when we delete an opening delimiter with "<BS>" the matching pair is also deleted, but last commit in YCM breaks this.
Running the :DelimitMateTest with and without YCM plugin activated we see the remapping of "<BS>" :
without YCM:
i "<BS>" @delimitMateBS
Last set from ~/.vim/bundle/delimitMate/plugin/delimitMate.vim
with YCM:
i "<BS>" * 98_OnDeleteChar( "<BS>" )
Last set from ~/.vim/bundle/YouCompleteMe/autoload/youcompleteme.vim
Have https://github.com/Raimondi/delimitMate plugin and YouCompleteMe plugin active, for example open a PHP file.
write:
function test ( | )
then press "<BS>"
function test |
write:
function test ( | )
then press "<BS>"
function test (|
I think its this line of code added on last commit
https://github.com/Valloric/YouCompleteMe/blob/master/autoload/youcompleteme.vim#L252
Maybe have an option to add or remove keys to this functionality?
Thanks in advance, sorry for bad English.
The text was updated successfully, but these errors were encountered: