Problem with C language autocomplete, Keybinding


Hello there,

I just started using this editor. However, i found weird the autocomplete of the scanf in C++ code. When i type scanf then enter to autocomplete, it gives me:

scanf("%s\n", );

Note the \n following the special character. That shouldn’t be there, as it causes a bug. It’s a really annoying bug because it’s easy to go unnoticed and doesn’t generates any warning while compiling. I’m om Atom 1.10 (the current stable release as of now).

Also, i’m having trouble trying to change a keyboard binding. In sublime, to indent a line by one tab i can use Ctrl-[, and to “unindent” i can use Ctrl-]. I realize that in the default configs of Atom, the latter binding is used to collapse the tree directory, and even though i tried to override it in my file, it was not sucessful.
I tried the following:

‘ctrl-]’: ‘unset!’

‘ctrl-]’: ‘unset!’

I understand that i can “unindent” the line via Ctrl-’, but i’m used to Sublime and that really would be a great binding for me.



That’s what the language-c snippet file is telling Atom to put. If you believe the snippet file is in error, feel free to open an issue on that package’s repo. If you would like to override it, enter the following into your snippets.cson:

    'prefix': 'scanf'
    'body': 'scanf(\"${1:%s}\", $2);$3'

I tried the following:

Please share the entirety of your keymap.cson and tag it as code to preserve the indentation. It would also be helpful to see the output of the Keybinding Resolver (ctrl-.) when you try each key.