在 TextMate 中缩进部分选定的行
有没有办法让 TextMate 在仅选择部分行时缩进整行?目前,当我通过将鼠标拖动到多行上方或按住 Shift 键并按向上/向下键来选择多行时,按缩进键 (Opt-TAB) 只会将行的选定部分移动一个缩进等级。对于程序员来说,这比无用更糟糕,因为它破坏了正在分裂的那一行上的代码。我曾经使用过的所有其他编辑器都认识到您实际上想要缩进整行,并且就是这样做的。
我听说 TextMate 具有令人难以置信的可定制性,所以我希望有人知道一种方法让它发挥预期的作用。也许按缩进键会扩展选择以自动包含整行,然后缩进?
Is there any way to make TextMate indent an entire line when only part of it is selected? Currently, when I select several lines by dragging my mouse over them, or holding shift and pressing up/down, pressing the indent key (Opt-TAB) only shifts the selected portion of the line by one indent level. That is worse than useless to a programmer, because it ruins your code on that line that's getting split apart. Every other editor that I've ever used recognizes that you actually want to indent that entire line, and does just that.
I've heard that TextMate is incredibly customizable, so I'm hoping that someone knows a way to make it act like one expects. Maybe so that pressing the indent key expands the selection to include the whole line automatically, and then does the indent?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需在鼠标悬停后按选择行 (cmd-shift-L) 即可。这将使任何部分行选择变成全行选择。
Just press Select Line (cmd-shift-L) after mousing. That will make any partial-line selections into full-line selections.
部分选定的行上的“Text/IndentLine”(Alt-Cmd-[)在我的机器上完成了这项工作。
"Text/IndentLine" (Alt-Cmd-[) on partially selected lines does the job on my machine.