Is there any shortcut for CodeBlocks to format the code?

Twi*_*Twi 21 hotkeys codeblocks

Is there any shortcut for CodeBlocks to format the code?

I haven't find any tip in google.

I found only "format use AStyle", but it come up with right mouse button only...

小智 39

可能不是默认情况下你应该能够在那里分配它:

Settings -> Editor -> Keyboard shortcuts -> Plugins -> Source code formatter (AStyle)
Run Code Online (Sandbox Code Playgroud)

  • 在 Ubuntu 中,如果你没有找到 *Keyboard shortcuts* 设置,那么从终端安装 `codeblocks-contrib`。安装命令:`sudo apt install codeblocks-contrib`。 (4认同)
  • 在v16.01(截至发言,最新稳定版),我找不到键盘快捷键页面:/ (2认同)

roo*_*ler 6

我最喜欢的 = Ctrl +A然后Ctrl+ Shift+ F

您(我相信这些是默认设置)可以选择一个代码块并按下Tab键。这将缩进整个块。

所以要缩进整个文件:Ctrl+ A,然后Tab.

此外,您可以在选定的块上使用Shift+Tab“取消缩进”

您可以通过打开的选项卡与移动Ctrl+ Shift+ Tab

至于最好的捷径:

我喜欢Ctrl+D复制一行并

Ctrl+L复制它。

无论如何,您可以在编辑器菜单中设置您喜欢的任何快捷键(在那里您还可以找到当前设置的所有快捷键)。