Linux中整理代码工具indent的使用
来源:互联网 发布:aps审核 知乎 编辑:程序博客网 时间:2024/05/17 03:12
查看文件vim
就会看到:
#!/bin/sh
PARAM="-npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1"
RES=`indent --version`
V1=`echo $RES | cut -d' ' -f3 | cut -d'.' -f1`
V2=`echo $RES | cut -d' ' -f3 | cut -d'.' -f2`
V3=`echo $RES | cut -d' ' -f3 | cut -d'.' -f3`
if [ $V1 -gt 2 ]; then
elif [ $V1 -eq 2 ]; then
fi
indent $PARAM "$@"
其中有一行:
这一行就是linux内核使用indent整理代码的格式。
其中-l80是每一行最多80个字母,超出会拆行,如果不喜欢可以使用更长的行字数
使用的indent参数 值 含义
--blank-lines-after-declarations
--blank-lines-after-procedures
--blank-lines-before-block-comments
--break-before-boolean-operator
--blank-lines-after-commas
--braces-after-if-line
--brace-indent 0
--braces-after-struct-decl-line
--comment-indentationn
--declaration-comment-columnn
--comment-delimiters-on-blank-lines
--cuddle-do-while
--cuddle-else
--case-indentation 0
--else-endif-columnn
--space-after-cast
--line-comments-indentation n
--break-function-decl-args
--declaration-indentationn
--format-first-column-comments
--format-all-comments
--honour-newlines
--indent-leveln
--parameter-indentationn
--line-length 75
--continue-at-parentheses
--space-after-procedure-calls
--space-after-parentheses
--procnames-start-lines
--space-after-for
--space-after-if
--space-after-while
--start-left-side-of-comments
--swallow-optional-blank-lines
--space-special-semicolon
--tab-size
--use-tabs
- Linux中整理代码工具indent的使用
- linux下使用indent整理代码
- linux下使用indent整理代码
- linux下使用indent整理代码
- linux下代码对齐工具indent的使用
- linux 的代码格式化工具 indent
- linux下使用indent整理代码(代码格式化)
- Linux 代码格式化工具 indent
- Linux 代码格式化工具 indent
- Linux 代码格式化工具 indent
- Linux 代码格式化工具 indent
- Linux 代码格式化工具 indent
- Linux下代码格式整理程序Indent的参数说明
- indent是linux下一个能力极强的代码整理软件
- linux 源代码整理格式工具--indent
- Linux C/C++ 编程 (一)—— indent 工具(代码整理工具)
- 个人喜好的缩进风格: indent工具使用[linux]
- linux下代码格式化工具:indent
- iOS开发:AFNetworking和ASIHTTPRequest的比较
- 无线APP日志上报优化实践
- 欢迎使用CSDN-markdown编辑器
- PHP基础——表达式、位运算、数组
- 二、Ubuntu12.04和14.04安装ssh和vnc远程桌面
- Linux中整理代码工具indent的使用
- Spring定时任务异常
- 【VS开发】获取CPU tick tick 周期
- 深入分析Java的序列化与反序列化
- 【iOS开发】-canOpenURL: failed for URL: "xx" - error:"This app is not allowed to query for scheme xx"
- Core Animation - 第一次使用图层来创建一个简单的项目
- HTTP基本原理(浏览器缓存)
- Ajax学习(3)数据格式提要
- NOIP 2009 最优贸易