⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 astyle.html

📁 一个强大的源代码格式化程序
💻 HTML
📖 第 1 页 / 共 5 页
字号:
				<p><font color="#000080" size="4"><b>-K</b></font><font size="3"> OR</font><font color="#000080" size="4"><b>
							--</b></font><font color="#000080" size="3"><b>indent-cases</b></font><font size="2"><br>
					</font><font size="3">Indent 'case XXX:' lines so that they are flush with the 
						comand lines under them.</font></p>
				<blockquote>
					<p><font color="#330000" size="3">The default:</font></p>
				</blockquote><blockquote>
					<p><font color="#800080" size="3"><b><tt>switch (foo)<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font color="#800080" size="3"><b><tt><br>
									case 1:<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>{<br>
								</tt></b></font><font color="#800080" size="3"><b><tt>&nbsp;&nbsp;&nbsp; 
									&nbsp;&nbsp;&nbsp; a += 2;<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>}<br>
								</tt></b></font><font color="#800080" size="3"><b><tt>
									<br>
									default:<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>{<br>
								</tt></b></font><font color="#800080" size="3"><b><tt>&nbsp;&nbsp;&nbsp; 
									&nbsp;&nbsp;&nbsp; a += 2;<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font><font color="#800080" size="3"><b><tt><br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
					<p><font color="#330000" size="3">becomes:</font>
					</p>
					<p><font color="#800080" size="3"><b><tt>switch (foo)<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font color="#800080" size="3"><b><tt><br>
									&nbsp;&nbsp;&nbsp; case 1:<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>{<br>
								</tt></b></font><font color="#800080" size="3"><b><tt>&nbsp;&nbsp;&nbsp; 
									&nbsp;&nbsp;&nbsp; a += 2;<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>}<br>
								</tt></b></font><font color="#800080" size="3"><b><tt>
									<br>
									&nbsp;&nbsp;&nbsp; default:<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>{<br>
								</tt></b></font><font color="#800080" size="3"><b><tt>&nbsp;&nbsp;&nbsp; 
									&nbsp;&nbsp;&nbsp; a += 2;<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font><font color="#800080" size="3"><b><tt><br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
				</blockquote>
				<p><font color="#000080" size="4"><b>-B</b></font><font size="3"> OR</font><font color="#000080" size="4"><b>
							--</b></font><font color="#000080" size="3"><b>indent-brackets</b></font><font size="3"><br>
						Add extra indentation to brackets.</font>
				</p>
				<blockquote>
					<p><font color="#330000" size="3">The default:</font></p>
					<p><font color="#993399" size="3"><b><tt>if (isFoo)</tt></b></font>
						<br>
						<font color="#ff0000" size="3"><b><tt>{</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#993399" size="3">
							<b><tt>bar();</tt></b></font>
						<br>
						<font color="#ff0000" size="3"><b><tt>}</tt></b></font>
						<br>
						<font color="#993399" size="3"><b><tt>else</tt></b></font>
						<br>
						<font color="#ff0000" size="3"><b><tt>{</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#993399" size="3">
							<b><tt>anotherBar();</tt></b></font>
						<br>
						<font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
					<p><font color="#330000" size="3">becomes:</font>
					</p>
					<p><font color="#993399" size="3"><b><tt>if (isFoo)</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3">
							<b><tt>{</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#993399" size="3">
							<b><tt>bar();</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3">
							<b><tt>}</tt></b></font>
						<br>
						<font color="#993399" size="3"><b><tt>else</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3">
							<b><tt>{</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#993399" size="3">
							<b><tt>anotherBar();</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3">
							<b><tt>}</tt></b></font></p>
				</blockquote>
				<p><font color="#000080" size="4"><b>-G</b></font><font size="3"> OR</font><font color="#000080" size="4"><b>
							--</b></font><font color="#000080" size="3"><b>indent-blocks</b></font><font size="3"><br>
						Add extra indentation to entire blocks.</font>
				</p>
				<blockquote>
					<p><font color="#330000" size="3">The default:</font></p>
					<p><font color="#993399" size="3"><b><tt>if (isFoo)</tt></b></font>
						<br>
						<font color="#ff0000" size="3"><b><tt>{</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#993399" size="3">
							<b><tt>bar();</tt></b></font>
						<br>
						<font color="#ff0000" size="3"><b><tt>}</tt></b></font>
						<br>
						<font color="#993399" size="3"><b><tt>else</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#993399" size="3">
							<b><tt>anotherBar();</tt></b></font>
					</p>
					<p>becomes:</p>
					<p><font color="#993399" size="3"><b><tt>if (isFoo)</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3">
							<b><tt>{</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; </tt></b></font><font color="#993399" size="3">
							<b><tt>bar();</tt></b></font>
						<br>
						<font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3">
							<b><tt>}</tt></b></font>
						<br>
						<font color="#993399" size="3"><b><tt>else</tt></b></font> <font face="Courier New" size="3">
							<b><tt>
									<br>
								</tt></b></font><font size="3"><b><tt>&nbsp;&nbsp;&nbsp; </tt></b></font>
						<font color="#993399" size="3"><b><tt>anotherBar();</tt></b></font>
					</p>
				</blockquote>
				<p><font color="#000080" size="4"><b>-N</b></font><font size="3"> OR</font><font color="#000080" size="4"><b>
							--</b></font><font color="#000080" size="3"><b>indent-namespaces</b></font><font size="2"><br>
					</font><font size="3">Add extra indentation to namespaces.</font>
				</p>
				<blockquote>
					<p><font color="#330000" size="3">The default:</font></p>
				</blockquote><blockquote>
					<p><font color="#800080" size="3"><b><tt>namespace foospace<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font color="#800080" size="3"><b><tt><br>
									class Foo<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font color="#800080" size="3"><b><tt><br>
									&nbsp;&nbsp;&nbsp; public:<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Foo();<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; virtual ~Foo();<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font><font color="#800080" size="3"><b><tt>;<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
					<p><font color="#330000" size="3">becomes:</font>
					</p>
					<p><font color="#800080" size="3"><b><tt>namespace foospace<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font color="#800080" size="3"><b><tt><br>
									&nbsp;&nbsp;&nbsp; class Foo<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font color="#800080" size="3"><b><tt><br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; public:<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Foo();<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; virtual ~Foo();<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font><font color="#800080" size="3"><b><tt>;<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
				</blockquote>
				<p>&nbsp;</p>
				<p><font color="#000080" size="4"><b>-L</b></font><font size="3"> OR</font><font color="#000080" size="4"><b>
							--</b></font><font color="#000080" size="3"><b>indent-labels</b></font><font size="2"><br>
					</font><font size="3">Add extra indentation to labels so they they appear 1 indent 
						less than the current indentation, rather than being flushed to the left (the 
						default).</font>
				</p>
				<blockquote>
					<p><font color="#330000" size="3">The default:</font></p>
				</blockquote><blockquote>
					<p><font color="#800080" size="3"><b><tt>int foospace()<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font color="#800080" size="3"><b><tt><br>
									&nbsp;&nbsp;&nbsp; while (isFoo)<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>{<br>
								</tt></b></font><font color="#800080" size="3"><b><tt>&nbsp;&nbsp;&nbsp; 
									&nbsp;&nbsp;&nbsp; ...</tt></b></font><font color="#ff0000" size="3"><b><tt><br>
								</tt></b></font><font color="#800080" size="3"><b><tt>&nbsp;&nbsp;&nbsp; 
									&nbsp;&nbsp;&nbsp; goto error;<br>
									<br>
									error:<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font><font color="#800080" size="3"><b><tt><br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
					<p><font color="#330000" size="3">becomes:</font>
					</p>
					<p><font color="#800080" size="3"><b><tt>int foospace()<br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>{</tt></b></font><font color="#800080" size="3"><b><tt><br>
									&nbsp;&nbsp;&nbsp; while (isFoo)<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>{<br>
								</tt></b></font><font color="#800080" size="3"><b><tt>&nbsp;&nbsp;&nbsp; 
									&nbsp;&nbsp;&nbsp; ...</tt></b></font><font color="#ff0000" size="3"><b><tt><br>
								</tt></b></font><font color="#800080" size="3"><b><tt>&nbsp;&nbsp;&nbsp; 
									&nbsp;&nbsp;&nbsp; goto error;<br>
									<br>
									&nbsp;&nbsp;&nbsp; error:<br>
									&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ...<br>
									&nbsp;&nbsp;&nbsp; </tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font><font color="#800080" size="3"><b><tt><br>
								</tt></b></font><font color="#ff0000" size="3"><b><tt>}</tt></b></font></p>
				</blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -