How can I disable or override the `inspect` snippet?


The snippet I hope to disable or override is:


It will be expanded to console.log(require('util').inspect(, { depth: null }));.
I know it might be duplicated with How to override a default snippet? discussing thread.
However, it seems I cannot figure out how to do it in that thread, so I am asking.
Thank you for your help :slight_smile:


I don’t have a snippet that activates on inspect. Considering the fact that it’s spawning JavaScript, I would say that you’ve probably installed some package that’s providing snippets. Can you think of which one that might be?


@DamnedScholar - do you ever sleep? :wink:

@benpptung: Override on your snippets.cson file.
Reached from FILE > SNIPPETS
Add the following:

  'Word: inspect':
    'prefix': 'inspect'
    'body': 'inspect'

Please let me know if this works for you as I expect it to.





@danPadric: it works. and I think I’ve figured out how to override this and other snippets…Thank you :slight_smile:

I don’t know which package the inspect snippet coming from, and see no way to check it. Previously, I thought it is a default snippet… :smiley:


The usual way of finding out which package does a thing when you can’t observe directly is to guess. You look at the most likely candidates and disable them to eliminate them until you find the right one. However, you’re in luck. Unless the package has a script that is adding snippets directly, you know that it’s going to be in a snippets.cson file in one of your packages. So what you can do is open .atom/packages in Atom and then search in the whole project for the string 'inspect'.


I am not lucky. Cannot find it in .atom/packages.
I’ve tried to disable all the community packages or core packages, but none of them will disable the inspect snippet except autocomplete-snippets or snippets. However, I believe the two packages are not about the inspect snippet. They are just to disable the feature of snippet or autocomplete.


I can confirm inspect() is built-in to Atom’s language selection.


What @benpptung is seeing is a snippet that expands to console.log(require('util').inspect(, { depth: null }));. That’s definitely the behavior of a snippet, not an autocompletion.


It is good you explicitly said that.
I get sometimes get confused with auto-complete vs snippet vs emmet.


I’ve found out where is inspect snippet.
It’s coming from language-javascript package.


So, it is not considered as a default snippet in Atom ? I don’t understand why, this is not a core package created by atom team?
Anyway, I wish they can provide some settings to disable this snippet and some other snippets.


Hi Ben. Good to hear from you.

As you could identify it inside a package - it is an add-on; it is not
considered to be part of the core. Regardless who created it, it is still a
package which can be switched off and be replaced by another language

You could clone the package and make the changes you want. Then switch off
the default one and use your custom version instead.

A step back first -
How does the triggering of the snippets work on your system at the moment?
Would it help if you had to press a particular key to confirm the usage of
a snippet?
Maybe the resolve lies in answering those two questions.



No, that’s correct. It’s a core package. With that name, you should be able to override it by adding this snippet to your snippets.cson:

        prefix: 'inspect'
        body: 'inspect'


For further clarification, I can only think of three differences between core and community packages.

  1. Community packages take precedence over core packages whenever there are conflicts.
  2. Core packages are only updated alongside an Atom update.
  3. Core packages are maintained by members of the Atom organization.

So really, there’s only one functional difference - for the most part, a package is a package.


@danPadric, @Wliu, @DamnedScholar
Thank you for clarification, and sorry for misunderstanding.
I just switched from WebStorm to Atom, so I am sorry to assume snippets from core packages as default snippets. yes, I share the same opinion, a package is a package.

Atom is great!! Much! Much better than WebStorm!! I’ve been waiting for this switch for 1 year. Thank you for this great product!