如何获取 Xcode 8 的 clang 格式? [英] How to get clang format for Xcode 8?

查看:34
本文介绍了如何获取 Xcode 8 的 clang 格式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Xcode 更新到第 8 版之后.非常有用的 Alcatraz 插件管理器被锁定,并且像 clang-format、突出显示选定的单词出现或通过使用快捷方式调整字体大小等出色的实用程序都消失了.

After Xcode update to version 8. The very useful Alcatraz PlugIn Manager is locked out and superb utilities like clang-format, or highlight selected word occurrences, or resize the font by use of a shortcut are gone.

如何在源文件的任何父目录中使用模板 .clang-format 重新启用 clang-format 以格式化我当前的源代码文件?

How can I reenable clang-format to format my current source code file on save with a template .clang-format in any parent directory of the source file?

推荐答案

mapbox/XcodeClangFormat 扩展看起来就像在 Xcode8 中使用 clang 格式的一种很有前途的方法.

The mapbox/XcodeClangFormat extension looks like a promising way to get clang format working with Xcode8.

由于源代码编辑器扩展的限制,很遗憾,您只能为所有项目指定一个 .clang 格式的文件.保存时格式化"也不可用.

Due to the limitations of source editor extensions, unfortunately you can only specify one .clang-format file for all your projects. "Format on save" also is not available.

这篇关于如何获取 Xcode 8 的 clang 格式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆