I got a strange issue when I hit backspace while some text is selected and my cursor is close to an open parenthesis, example:
b(aaa) If I select aaa and my cursor is on the first a, I would like the full aaa string to be removed when I hit backspace. In other words I want this:
b() But I get that:
b)^? where ^? is in a different colour (may be a special character).
I suppose that the problem may come from some options or plug-in that I have like the fact that peered parenthesis are highlighted when the cursor is on it, or the command M-<dir> that move the cursor to the other parenthesis... I don't know.
Problem is the same whit " peers symbols or any peers symbols regarding the language that emacs detect. For example in C the problem is present with (``"``{ etc...
Any ideas?
EDIT:
Problem is the same with
vi(is better) If I want to delete both words in the parenthesis
M-dwill delete the word when you are on the first character (don't need to mark the word). and you probably haveparedit-mode(or similar) on which can be disabled withM-x paredit-mode.paredit-mode. But thx for theM-dtrick. However, the problem is still here when I have something likea(word1 word2)if i want to delete both words.autopair-modeis enable. If this is your case, you can useelectric-pair-modeinstead.