java类文件折叠和展开快捷键

<span style="font-family: Arial;"><span style="line-height: 22px;">千行的class看着实在费劲,试试代码折叠吧,哈哈!</span></span>
<span style="font-family: Arial;"><span style="line-height: 22px;">
</span></span>
<span style="font-family: Arial;"><span style="line-height: 22px;">首先  </span></span><pre id="best-answer-content" class="reply-text mb10" name="code" style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 10px; padding: 0px; zoom: 1; background-color: rgb(255, 252, 246);"><pre id="best-answer-content" class="reply-text mb10" name="code" style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 10px; padding: 0px; font-family: Arial; zoom: 1; line-height: 22px; background-color: rgb(255, 252, 246);"><span style="font-family: 'Times New Roman'; line-height: 26px;">在eclipse 中开启设置代码折叠功能</span>
1. windows->perferences->General->Editors->Structured Text Editors
<a target=_blank href="http://www.haogongju.net/tag/%E5%8F%AF%E4%BB%A5" target="_blank" title="可以" style="color: rgb(51, 51, 51); text-decoration: none; margin: 0px; padding: 0px; font-family: 'Times New Roman';">可以</a><span style="font-family: 'Times New Roman';">看到Enable fold</span><a target=_blank href="http://www.haogongju.net/tag/in" target="_blank" title="in" style="color: rgb(51, 51, 51); text-decoration: none; margin: 0px; padding: 0px; font-family: 'Times New Roman';">in</a><span style="font-family: 'Times New Roman';">g选项,打上勾就可以使用代码折叠</span><a target=_blank href="http://www.haogongju.net/tag/%E5%8A%9F%E8%83%BD" target="_blank" title="功能" style="color: rgb(51, 51, 51); text-decoration: none; margin: 0px; padding: 0px; font-family: 'Times New Roman';">功能</a><span style="font-family: 'Times New Roman';">,但还要在具体的语言中设置。</span><br style="margin: 0px; padding: 0px; font-family: 'Times New Roman';" /><span style="font-family: 'Times New Roman';">2、</span><pre id="best-answer-content" class="reply-text mb10" name="code" style="white-space: pre-wrap; word-wrap: break-word; margin-top: 0px; margin-bottom: 10px; line-height: 22px; padding: 0px; font-family: Arial; zoom: 1; background-color: rgb(255, 252, 246);">windows->perferences->Java->Editors->Folding
<a target=_blank href="http://www.haogongju.net/tag/%E5%8F%AF%E4%BB%A5" target="_blank" title="可以" style="color: rgb(51, 51, 51); text-decoration: none; margin: 0px; padding: 0px; font-family: 'Times New Roman'; line-height: 26px;">可以</a><span style="font-family: 'Times New Roman'; line-height: 26px;">看到Enable fold</span><a target=_blank href="http://www.haogongju.net/tag/in" target="_blank" title="in" style="color: rgb(51, 51, 51); text-decoration: none; margin: 0px; padding: 0px; font-family: 'Times New Roman'; line-height: 26px;">in</a><span style="font-family: 'Times New Roman'; line-height: 26px;">g选项,打上勾就可以使用代码折叠</span><a target=_blank href="http://www.haogongju.net/tag/%E5%8A%9F%E8%83%BD" target="_blank" title="功能" style="color: rgb(51, 51, 51); text-decoration: none; margin: 0px; padding: 0px; font-family: 'Times New Roman'; line-height: 26px;">功能</a><span style="font-family: 'Times New Roman'; line-height: 26px;">。</span>
<span style="font-family: 'Times New Roman';">其次 </span>
<span style="font-family: 'Times New Roman';">使用快捷键</span>
<span style="line-height: 26px; font-family: 'Times New Roman';">下面你就可以用如下快捷键在你的java class 中 折叠或者展开你的代码了.</span>



代码折叠的快捷键,默认是:
    Ctrl+Shift+Numpad_Divede(小键盘的/号)
    Ctrl+Shift+Numpad_Multiply(小键盘的*号)
笔记本没小键盘,于是改成:
    Ctrl+Shift+-
    Ctrl+Shift+=



你可能感兴趣的:(java类文件折叠和展开快捷键)