emacs: Cc % 在 auctex 中做什么以及如何让它表现得更好?
Cc %
应该是用于注释内容的 emacs auctex 模式快捷方式。 (还有 Cc ;
可以注释掉标记的区域,但是这个可以工作)。现在有时它会注释掉一行,有时它会注释掉一行及其上面的行。它似乎没有非常一致的行为。
我真正希望它做的是注释掉光标所在的行,除非它位于开始或结束标记上,在这种情况下注释掉整个环境。 (实际上,我只想理解注释宏稍微奇怪的行为......)
C-c %
is supposed to be the emacs auctex mode shortcut for commenting out stuff. (There's also C-c ;
which comments out the marked region, but that one works). Now sometimes it comments out a single line, sometimes it comments out a line and the ones above it. It doesn't seem to have very consistent behaviour.
What I'd really like it to do is comment out the line the cursor is on unless it's on a begin or end tag, in which case comment out the whole environment. (Actually, I'd settle for just understanding the slightly odd behaviour of the comment macro...)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Cc %
运行TeX-comment-or-uncomment-paragraph
。要了解此处的段落到底是什么,请参阅手册:这是一个评论功能,或多或少可以满足您的需求。仅当
LaTeX-syntropic-comments
是t
(即使如此,也并不总是很好)。C-c %
runsTeX-comment-or-uncomment-paragraph
. For what exactly is considered a paragraph here, see the manual:Here's a commenting function that does more or less what you want. Uncommenting an environment only works if
LaTeX-syntactic-comments
ist
(and not always very well even then).