Closed peteruithoven closed 5 years ago
Can you paste the full contents of your snippets.cson
file? Do you happen to have another entry for `'.text.plain' in there?
I added the full contents below, I don't seem to have another .text.plain
.
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
# '.source.coffee':
# 'Console log':
# 'prefix': 'log'
# 'body': 'console.log $1'
#
'.text.html':
'JSPM html':
'prefix': 'html-jsmp'
'body': """
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>$3</title>
<script src="jspm_packages/system.js" charset="utf-8"></script>
<script src="config.js" charset="utf-8"></script>
<script type="text/javascript">
System.import('$1');
</script>
</head>
<body>
$2
</body>
</html>
"""
'*':
'Git ignores':
'prefix': 'gitignore'
'body': """
jspm_packages
node_modules
bundle.js
bundle.js.map
dist
"""
'.source.js':
'use strict':
'prefix': 'usestrict'
'body': "'use strict'\n"
'importfrom':
'prefix': 'imporfrom'
'body': "import $1 from '$2';\n"
'export default class':
'prefix': 'exportdefaultclass'
'body': """
export default class ${1:ClassName} {
constructor($2) {
$3
}
}
"""
'console log labeled value':
'prefix': 'loglabeled'
'body': "console.log('$1: ', $1);"
'console debug value':
'prefix': 'debug'
'body': "debug($1);"
'console debug labeled value':
'prefix': 'debuglabeled'
'body': "debug('$1: ', $1);"
'React component':
'prefix': 'rc'
'body': """
import React, {PropTypes} from 'react';
export default class $1 extends React.Component {
static propTypes = {
}
static defaultProps = {
}
render () {
return (
$2
);
}
}
"""
'Redux action creator':
'prefix': 'redux-action'
'body': """
export const $1 = '$1';
export function $2 ($3) {
return { type: $1, $3 };
}
"""
I can’t reproduce this. If this is still an issue:
autocomplete-plus
settings.text.plain
.If you can reproduce, please reopen and include a reduced test case. Thanks!
I've added a gitignore snippet, but it's not auto suggested like snippets usually are. It does show up in the
Snippets: Available
menu. I've added my snippet under two selectors. I've started Atom in safe mode.Why wouldn't this snippet be auto suggested? Also see: https://discuss.atom.io/t/solved-cant-get-this-snippet-for-text-plain-working/21389/8