dev:formattingconventions
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| dev:formattingconventions [2016/08/28 13:23] – instructions on editor integration 89.206.117.172 | dev:formattingconventions [2020/08/21 10:15] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 9: | Line 9: | ||
| * Removal of extraneous whitespace and consecutive blank lines. | * Removal of extraneous whitespace and consecutive blank lines. | ||
| * Uppercase notation for all Fortran and OpenMP keywords. | * Uppercase notation for all Fortran and OpenMP keywords. | ||
| - | ===== Editor integration ===== | + | |
| - | You can optionally integrate prettify into your editor. First install prettify with the '' | + | |
| - | < | + | |
| - | ./setup.py install | + | |
| - | </ | + | |
| - | or | + | |
| - | < | + | |
| - | ./setup.py install --user | + | |
| - | </ | + | |
| - | Then configure your editor such that it calls | + | |
| - | < | + | |
| - | </ | + | |
| - | for reformatting. For Vim, this is done by adding the following line to your vimrc: | + | |
| - | <code vim> | + | |
| - | autocmd Filetype fortran setlocal formatprg=fprettify\ --no-normalize-use\ --no-report-errors | + | |
| - | </ | + | |
| - | Reformat selected lines with '' | + | |
| ===== Manual formatting ===== | ===== Manual formatting ===== | ||
| The following formatting decisions are still manual and are never changed by prettify: | The following formatting decisions are still manual and are never changed by prettify: | ||
dev/formattingconventions.1472390584.txt.gz · Last modified: (external edit)
