Chinaunix首页 | 论坛 | 博客
  • 博客访问: 338033
  • 博文数量: 105
  • 博客积分: 2730
  • 博客等级: 少校
  • 技术积分: 1110
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-20 12:09
文章分类

全部博文(105)

文章存档

2013年(3)

2012年(2)

2011年(36)

2010年(34)

2009年(6)

2008年(20)

2007年(4)

分类: C/C++

2008-04-01 12:34:07

indent -kr -i4 -ts4 -sob -l80 -ss -bs -psl

在gedit中可以使用“外部工具”来构造格式化代码的工具,
#!/bin/sh
indent -kr -i4 -ts4 -sob -l80 -ss -bs -psl $GEDIT_CURRENT_DOCUMENT_NAME

-bad --blank-lines-after-declarations y n n n
-bap --blank-lines-after-procedures y y y n
-bbb --blank-lines-before-block-comments y      
-bbo --break-before-boolean-operator y y y y
-bc --blank-lines-after-commas n n n y
-bl --braces-after-if-line y y    
-blin --brace-indent n 0 2    
-bls --braces-after-struct-decl-line y y    
-br --braces-on-if-line     y y
-brs --braces-on-struct-decl-line     y y
-bs --blank-before-sizeof        
-cn --comment-indentationn 33   33 33
-cbin --case-brace-indentationn        
-cdn --declaration-comment-columnn 33   33 33
-cdb --comment-delimiters-on-blank-lines n n n y
-cdw --cuddle-do-while        
-ce --cuddle-else n n n y
-cin --continuation-indentationn     4 4
-clin --case-indentationn 0   0 0
-cpn --else-endif-columnn 33 1 33 33
-cs --space-after-cast y y y  
-dn --line-comments-indentationn 0   0  
-ndj indents declarations the same as code   y    
-bfda --break-function-decl-args n      
-din --declaration-indentationn 2 2 1 16
-fc1 --format-first-column-comments n n n y
-fca --format-all-comments n n n y
-gnu --gnu-style        
-hnl --honour-newlines y y y y
-in --indent-leveln 4 2 4 4
-ipn --parameter-indentationn 5 5 0 4
-kr --k-and-r-style        
-ln --line-lengthn 75   75 75
-cs --space-after-cast        
-dn --line-comments-indentationn        
-bfda --break-function-decl-args        
-din --declaration-indentationn        
-fc1 --format-first-column-comments        
-fca --format-all-comments        
-gnu --gnu-style        
-hnl --honour-newlines        
-in --indent-leveln        
-ipn --parameter-indentationn        
-kr --k-and-r-style        
-ln --line-lengthn        
-lcn --comment-line-lengthn        
-lp --continue-at-parentheses y   y y
-lps --leave-preprocessor-space        
-orig --original        
-npro --ignore-profile        
-pcs --space-after-procedure-calls y y n n
-pin --paren-indentationn        
-pmt --preserve-mtime        
-prs --space-after-parentheses n n n n
-psl --procnames-start-lines y y n y
-saf --space-after-for y y y y
-sai --space-after-if y y y y
-saw --space-after-while y y y y
-sbin --struct-brace-indentationn        
-sc --start-left-side-of-comments n n n y
-sob --swallow-optional-blank-lines n n n n
-ss --space-special-semicolon n   n n
-st --standard-output        
-T typenames Tell indent the name of typenames.        
-tsn --tab-sizen 4     8
-ut --use-tabs y      
-v --verbose        
-version Output the version number of indent.

阅读(965) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~