Closed hediyi closed 8 years ago
+1 Same issue here accept my snippet has a default value that it's selecting, and it's selecting the preceding white space.
# Python
'.source.python':
'Docstring':
'prefix': 'ds'
'body': """
'''${1:A description: Tell this function what to do}
Keyword arguments:
${2:arg1} -- ${3:description} ${4:(default ${5:0})}
Returns: ${6:string}
'''
"""
So when I hit tab to go to ${2:arg1}
, it selects all the preceding white space. When I start typing, it moves my indentation all the way to the right of the editor instead of honoring the indentation.
This is a duplicate of #140 - feel free to subscribe there for updates.
Say you have created a snippet with a
$n
at the beginning of a line (no spaces before it), as shown below. Then in a file, at a certain level of indention, when you try to expand that snippet, besides moving the cursor to the specified position, the spaces before it is selected.You can also reproduce the problem in other types of files.
Reproduction Steps:
Put this in the
snippets.cson
:"""
test.md
in Atom.test.md
, hit Tab once (to create a level of indentation), then enterrb
, hit Tab again.Expected behavior:
I should have