How to create a Python Snippet?


#1

Tried this:

'.text.py':
  'ipdb':
    'prefix': 'pdb'
    'body': 'import ipdb; ipdb.set_trace()'

And also this:

'.source.py':
  'ipdb':
    'prefix': 'pdb'
    'body': 'import ipdb; ipdb.set_trace()'

But none seem working.


#2

The second one should work. Are you typing pdb and then pressing TAB? Also, is there whitespace before pdb?


#3

Doing the exact thing. I’ve edited the snippet file, saved it, closed Atom, opened a new Python file, type pdb, press TAB and nothing happens (well, a tab is inserted) :smile:. No whitespace whatsoever.


#4

having the same issue, also tried .source.python and .text.python as top-level keys to no avail


#5

This work '.source.python'


#6

This worked for me. Thanks!