如何使用 tab-space 键缩进我的代码?
How do I indent my code with the tab-space key?
例如,我如何在 Firefox 控制台中输入 JS 代码:
if (10 > 5) {
alert("Hello world!");
alert("How are you doing today?");
alert("I'm doing great, thanks!")
}
不求助于 space 栏或操作系统的剪贴板?
我希望能够使用 Tab 键在 Firefox 控制台中缩进我的代码。每当我按下 Tab 键时,Firefox 都会浏览浏览器和网页的所有元素,而不会缩进我的代码。
我正在使用 Ctrl+Shift+K
快捷方式提供的控制台。
只是缩进。 Control + I.哈哈哈哈哈哈
可以尝试 Shift + Tab(不确定这是否适用于 firefox,但它适用于 Chrome)
这可能也不会回答您的问题,但它可能....
Editor Preferences
Preferences for the CodeMirror source editor, which is included in Firefox and used by several developer tools, including Scratchpad and the Style Editor.
Detect indentation: auto-indent new lines based on the current indentation
Autoclose brackets
Indent using spaces
Tab size
Keybindings: choose the default CodeMirror keybindings, or keybindings from one of several popular editors:
Vim
Emacs
Sublime Text
https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox
您可以使用 Scratchpad。更适合多行代码编辑,支持使用制表符缩进代码。
您可以在“开发者工具”菜单下找到它。 工具 > Web 开发人员 > Scratchpad OS X,以及 Menu > Developer > Scratchpad 在其他平台上。
您还可以将其添加到 工具箱选项(设置齿轮)下的工具箱,并选中 便签本 复选框。
例如,我如何在 Firefox 控制台中输入 JS 代码:
if (10 > 5) {
alert("Hello world!");
alert("How are you doing today?");
alert("I'm doing great, thanks!")
}
不求助于 space 栏或操作系统的剪贴板?
我希望能够使用 Tab 键在 Firefox 控制台中缩进我的代码。每当我按下 Tab 键时,Firefox 都会浏览浏览器和网页的所有元素,而不会缩进我的代码。
我正在使用 Ctrl+Shift+K
快捷方式提供的控制台。
只是缩进。 Control + I.哈哈哈哈哈哈
可以尝试 Shift + Tab(不确定这是否适用于 firefox,但它适用于 Chrome)
这可能也不会回答您的问题,但它可能....
Editor Preferences
Preferences for the CodeMirror source editor, which is included in Firefox and used by several developer tools, including Scratchpad and the Style Editor.
Detect indentation: auto-indent new lines based on the current indentation Autoclose brackets Indent using spaces Tab size Keybindings: choose the default CodeMirror keybindings, or keybindings from one of several popular editors: Vim Emacs Sublime Text
https://developer.mozilla.org/en-US/docs/Tools/Tools_Toolbox
您可以使用 Scratchpad。更适合多行代码编辑,支持使用制表符缩进代码。
您可以在“开发者工具”菜单下找到它。 工具 > Web 开发人员 > Scratchpad OS X,以及 Menu > Developer > Scratchpad 在其他平台上。
您还可以将其添加到 工具箱选项(设置齿轮)下的工具箱,并选中 便签本 复选框。