Macros in c++ autocomplete


#1

Hi
I have been using atom for long enough, but there is one problem that I feel should be improved. While I type macros in c++ like include and use autocomplete, the # sign gets repeated, one by me and other by autocomplete. It would be great if you add this feature to atom.
Current OS: Ubuntu 18.10
Atom version: 1.32.1
Thanks in advance


#2

Mind sharing a specific example? Please show exactly what you’re typing, what the output is, and what the snippet looks like.


#3

I am talking about that extra #


#4

I can’t help you unless you show me what the snippet looks like.


#5

I am not using any snippet. It’s by default atom auto complete.


#6

Hi Pradyuman,

You may not have aimed to use a snippet, but that is what you activated.
I agree that it would be nice if Atom detected the two # characters and deleted one.

If you type only Inc, you will be able to see the autocomplete offer the snippet.
image

If you start typing #inc you will be offered the same two snippets as seen in the picture, with the order reversed. The autocomplete however did not register the #, only the inc part.

Consider using the Inc or inc snippets instead of aiming to type in the whole #include.

I have tried to construct a snippets that uses #inc as trigger phrase. Unhappily I have not found a way to have the autocomplete give its co-operation.

Cheers.


#7

Thanks for your help :slight_smile:


#8

All the thanks goes to @DamnedScholar.
I only finished what he was progressing to.