如何在代码块中缩进我的代码? [英] How to indent my code in codeblocks?
问题描述
最好的代码块捷径是什么?还有一些方法可以直接缩进所有代码吗?此外,我们如何在代码块中的活动选项卡之间移动?
What are the best code blocks short cuts ? Also is there some way we can directly indent all our code ? In addition how can we move through the active tabs in codeblocks ?
推荐答案
您(我相信这些是默认设置)可以选择一个代码块,然后按 Tab 键。这将缩进整个块。
You (these are the default settings I believe) can select a block of code and press the Tab key. This will indent the entire block.
要缩进整个文件: Ctrl + A ,然后是 Tab 。
So for indenting a whole file: Ctrl + A, then Tab.
此外,您可以在选定的块上使用 Shift + Tab 来取消缩进
In addition, you can use Shift + Tab on a selected block to "unindent"
您可以使用 Ctrl + Shift + Tab 在打开的标签中移动
You can move through the open tabs with Ctrl + Shift + Tab.
至于最佳快捷方式:
我喜欢 Ctrl + D 复制一行,并
I like Ctrl + D to duplicate a line and
Ctrl + L 复制它。
无论如何,您都可以在编辑器菜单中设置所需的任何快捷键(在那里您还可以找到当前设置的所有快捷键)。
Anyway, you can set whatever shortkeys you like in the Editor menu (there you will also be able to find all shortkey currently set).
这篇关于如何在代码块中缩进我的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!