windsage
V2EX  ›  Vim

vim 中 clang-format 自定义设置

  •  
  •   windsage · Jun 24, 2019 · 3419 views
    This topic created in 2548 days ago, the information mentioned may be changed or developed.

    基本沿用 google 的代码风格,但是希望对* &这样的符合类型的进行设置 在定义指针和引用的时候* &跟随变量名,在强转类型的时候跟随类型名,没有空格 ClangFormatStyleOptions 好像没看到这个的设置 也可能我自己没看仔细,有人知道怎么设置吗?

    1 replies    2019-06-25 12:24:53 +08:00
    heikejia
        1
    heikejia  
       Jun 25, 2019 via iPhone
    首先如果你说的是这个插件的配置话

    https://github.com/rhysd/vim-clang-format

    那么可以参考我的配置,我是内核风格的 code style,欢迎交流

    https://github.com/tracyone/vinux/blob/master/after/ftplugin/c.vim#L79
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5411 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 05:57 · PVG 13:57 · LAX 22:57 · JFK 01:57
    ♥ Do have faith in what you're doing.