Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用一个注释来结束我的 if 语句,该注释指示 if 语句中检查的条件。我将 yasnippet 与 emacs 一起使用,我使用的代码段是这样的:
# -*- mode: snippet -*- # name: if # key: if # group : control structure # -- if ${1:cond}: $0 # endif $1
我的问题是最后的#endif注释与$0对齐。有没有办法让它与 if 语句保持一致?
的值yas-indent-line控制此行为。尝试添加
yas-indent-line
# expand-env: ((yas-indent-line 'fixed))
到标题。
I have the following code:
document.getElementById("launcherDiv").innerHTML = "<object id='launcher' classid='CLSID:17E88883-3488-46B8-BE4D-30568888855' codebase='Helper.CAB#version=8