How to Use the Format Fortran Indent Plugin for Code::Blocks ?
首先,安裝已經編譯好的 Format Fortran Indent Plugin。
下載對應版本的 Format_Fortran_Indent_Plugin.cbplugin。(可從https://github.com/ywx/FormatFortranIndentPlugin下載)
For Code::Blocks Release 12.11 rev 8629 for Windows x86
For Code::Blocks for Fortran v1.0 rev 8455 for Windows x86
For Code::Blocks svn 8982 for Windows x86
For Code::Blocks Release 12.11 rev 8629 for Linux CentOS 6 i686
For Code::Blocks Release 12.11 rev 8629 for Linux CentOS 6 x86_64
從 Code::Blocks 的 Plugins 菜單中選擇 Manage_plugins... 菜單項,
進入 Manage plugins 對話框。
點擊 Install New 按鈕,定位下載的 Format_Fortran_Indent_Plugin.cbplugin。
選擇打開進行安裝,安裝完成後關閉 Manage plugins 對話框。現在你就可以開始使用 Format Fortran Indent Plugin for Code::Blocks 。
任意打開一個 Fortran Project 中的或是單獨打開一個 Fortran Free Format 源文件。
你可以在以下地方找到可用的 Format Fortran Indent 菜單項:
- 鼠標右鍵快捷菜單如上圖
- Fortran 菜單中
- Plugins 菜單中
- Projects Management 中的單擊對應的 Fortran 源文件
執行 Format Fortran Indent,你會得到以下規整縮進的結果。
當然,你也可以只對選中的局部代碼進行縮進整理。
執行 Format Fortran Indent,你會得到以下規整縮進的結果。
你也可以,對項目中的所有 Fortran 源文件進行批處理。