Closed ffxsam closed 6 years ago
Updated post to include more details.
I'm also seeing this issue on 1.10.
However it only happens when the first word in a line is tab stop. So the following snippet will have wrong indentation:
'C++ constructor declaration':
'prefix': 'ctrd'
'body': """
/// Construct a ${1:'class'} instance
${1:'class'}(${2:'arguments'}) noexcept;$0
"""
'description': 'C++ constructor declaration'
While this snippet will behave correctly
'C++ class':
'prefix': 'cls'
'body': """
/// ${2:'doc'}
class ${1:'class'} {
$0
}; // end of class ${1:'class'}
"""
'description': 'C++ class declaration'
This is still a problem. I now have two snippets that don't indent properly (on Babel JS filetypes).
'.source.js':
'React Method':
'prefix': 'rmethod',
'body': """
$1 = ($2) => {
$3
};
"""
'React PropType':
'prefix': 'rptype',
'body': """
/*
* $1
*/
$2: PropTypes.$3
"""
The issue seems to be with a $
argument at the beginning of a line.
I have the same problem.
this issue has not been solved in one year ? will it be some time so we can use Atom properly ?
@50Wliu Any updates on this?
No. Contributions are gladly appreciated.
@50Wliu oft to complain, but slow to contribute. Sums up OSS in a nutshell. I however appreciate your efforts in making snippets available in Atom!
@mikeerickson Pardon me, but I was filing an issue and following up. Not “complaining.” And some of us are full-time devs working 60-80 hours per week, with no time for OSS contributions.
@ffxsam I am a full time developer myself, working 6 days/week, 12-15 hour days... Don't need to battle about working hours.
Further the complaint was not from you, but rather @inwardmovement "this issue has not been solved in one year? will it be some time so we can use Atom properly ?"
Atom works properly, just has an issue with expanding a snippet.
Let's keep things classy here everyone. We expect everyone to follow the Atom Code of Conduct in their interactions.
@mikeerickson I agree, people should keep their issues neutral and not make demands of OSS developers. But we shouldn't make assumptions about people's time availability to make contributions.
I agree my message was a bit harsh... please forgive me. I just found it strange that this bug (that totally prevents me from migrating from Notepadd++ to Atom, for example) which seems quite important to me (I agree it is totally personal) was not yet solved. I thought Atom/GitHub community was big and full of passionate and available coders to do "the job" in the minute, but now I realize it is maybe not so simple :) So my bad, this bug will be solved when someone has time to do so and that's it. Maybe I will take a look at it when I have finished other projects, although I don't know anything at Atom coding for now, we never know... Have a good day everyone.
edit: if someone suspects the bug to "take place" in this file or that file, feel free to mention it so I would have a place to start. Sorry for my bad english I hope you understand.
@inwardmovement Thanks for that :) not to mention, this is not a critical bug either, and there are likely dozens of other things that warrant more attention.
Will be fixed by #245. I need to figure out why though and then add a spec.
Ah, I see what the problem was. Indentation was happening after the snippet was inserted. Since tab stops are removed, it was picking up the space in front of the =
as extra indentation. But in #245 indentation happens before the snippet is inserted.
Having the same issue. Thanks for you efforts :)
Snippet indentation is incorrect. I have the following snippet:
I open a .js file and type "rm" then hit tab and fill it in.
Expected behavior: [What you expected to happen]
Expected result: (e.g.):
Actual behavior: [What actually happened]
Versions
You can get this information from executing
atom --version
andapm --version
at the command line. Also, please include the OS and what version of the OS you're running.