我使用 SublimeText3 和 LaTeXTools 进行 LaTeX 工作,并希望它在按下 ctrl+enter 时插入双反斜杠+换行符。像这样:
asdf\\
foobar
我尝试将以下内容插入“Default (Linux).sublime-keymap”:
{
"keys": ["ctrl+enter"],
"command": "insert_snippet",
"args": {"contents": "\\\\\n"},
"context":
[
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}
]
}
但是按 ctrl+enter 键会创建以下内容:
asdf\
foobar
这是为什么?我该如何解决?
答案1
解决方案(感谢 Karan):
插入“Default (Linux).sublime-keymap”:
{
"keys": ["ctrl+enter"],
"command": "insert_snippet",
"args": {"contents": "\\\\\\\\\n"},
"context":
[
{"key": "selector", "operator": "equal", "operand": "text.tex.latex"}
]
}