安装配置astyle
1. 下载astyle
https://sourceforge.net/settings/mirror_choices?projectname=astyle&filename=astyle/astyle%202.05.1/astyle_2.05.1_linux.tar.gz
2. 编译
tar -xvf astyle_2.05.1_linux.tar.gz
cd astyle/build/gcc
- make
- make install #安装astyle到/usr/bin目录下。
- make clean
3. 拷贝
cp /usr/bin/astyle /opt/Qt5.7.0/
4. 设置1) 进入Qt Creator设置.
2) Tools->Options.. 进入设置.
3)左侧选Environment. 右侧选External Tools. 设置外部工具.
4) 点击下方的add 按钮. 选add tools. 新增astyle.
5)选中刚添加的astyle配置参数:
执行文件: /opt/Qt5.3.0/astyle astyle可执行文件放置到目录
参数: --A2 --s2 %{CurrentDocument:FilePath}
在Tools->External菜单中就出现了astyle