给Sublime安装C/C++语言格式化插件

By admin, 11 十一月, 2016
  1. 打开控制台:Ctrl+Shift+P (or Cmd+Shift+P in Mac)
  2. 输入安装包:Package Control: Install Package
  3. 搜索安装clang format插件(https://packagecontrol.io/packages/Clang%20Format)
  4. Sublime->Preference->Packge Settings->Clang Format->Setting User。添加如下配置,让C/C++文件保存时自动格式化。

{ "format_on_save": true }

5. 安装clang-format:brew install clang-format或apt install clang-format。这是最重要的一步,这是sublime的哲学! 

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"