如何防止 Sublime Text 3 自动缩进一行 [英] How do I prevent Sublime Text 3 from auto-indenting a line as a one off

查看:81
本文介绍了如何防止 Sublime Text 3 自动缩进一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在 Sublime Text 3 中编辑 HTML 或 CSS 时,当我按下 [ENTER] 键时,这些行会自动缩进,这通常非常有用.

When I'm editing HTML or CSS in Sublime Text 3 the lines auto-indent when I hit the [ENTER] key, which generally is very useful.

有时我发现自己想要粘贴一行已经缩进的标记,这会导致双缩进.

On occasion I find myself wanting to paste a line of markup which is already indented, and this results in double indentation.

是否有其他组合键以及 [ENTER] 键可以防止下一行自动缩进,而是将光标返回到该行的开头?请注意,我不想在全局范围内关闭自动缩进.

Is there some other key combination along with the [ENTER] key that prevents the next line from auto-indenting and instead returns the curson to the very beginning of the line? Please note I don't want to turn off auto-indent on a global basis.

推荐答案

我在 Windows 中发现 CTRL + SHIFT + V(而不仅仅是 CTRL + V)执行粘贴和缩进",从而根据需要更正缩进.

I found in Windows that CTRL + SHIFT + V (rather than just CTRL + V) does a "paste and indent" whereby the indentation is corrected as necessary.

也可以按照以下说明将默认粘贴切换为缩进:https://gist.github.com/twosixcode/1988097

It's also possible to switch the default paste for paste as indent as per these instructions: https://gist.github.com/twosixcode/1988097

这篇关于如何防止 Sublime Text 3 自动缩进一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆