Atom snippnet无法使用TAB触发器

时间:2016-09-14 07:37:12

标签: atom-editor

我设法在Atom中设置了几个.scss片段。它们都工作正常,但是当我按下TAB键时不会触发它们。它们只有在按下ENTER时才能工作。当我按TAB键时,它将输入CSS声明而不是实际的片段。此外,当我按下ENTER键以显示片段时,我无法通过我在片段中设置的光标位置进行TAB。

以下是我使用的代码:

# --------------------------------- SCSS
'.source.css.scss':
	'breakpoint mobone':
		'prefix': 'mobone'
		'body': """
			@include breakpoint(mobone) {
				$1
			}
			"""
	'breakpoint mobone-up':
		'prefix': 'mobone-up'
		'body': """
			@include breakpoint(mobone-up) {
				$1
			}
			"""
	'breakpoint mobtwo':
		'prefix': 'mobtwo'
		'body': """
			@include breakpoint(mobtwo) {
				$1
			}
			"""
	'breakpoint mobtwo-up':
		'prefix': 'mobtwo-up'
		'body': """
			@include breakpoint(mobtwo-up) {
				$1
			}
			"""
	'breakpoint tabone':
		'prefix': 'tabone'
		'body': """
			@include breakpoint(tabone) {
				$1
			}
			"""
	'breakpoint tabone-up':
		'prefix': 'tabone-up'
		'body': """
			@include breakpoint(tabone-up) {
				$1
			}
			"""
	'breakpoint tabtwo':
		'prefix': 'tabtwo'
		'body': """
			@include breakpoint(tabtwo) {
				$1
			}
			"""
	'breakpoint tabtwo-up':
		'prefix': 'tabtwo-up'
		'body': """
			@include breakpoint(tabtwo-up) {
				$1
			}
			"""

有人可以帮忙吗?

由于

1 个答案:

答案 0 :(得分:1)

可能与在同一范围内工作的另一个包有冲突。

  1. 以安全模式atom --safe打开Atom,查看snippets.cson中的代码段是否有效。

  2. 在Mac上打开keybinding-resolver Cmd + Ctrl + 其他地方)并触发你的片段。在屏幕的下半部分,它将显示执行的命令(或代码段)。

  3. 在最糟糕的情况下,您必须浏览所有在.source.css.scss范围内工作的软件包(可能不是那么多。)

相关问题