gpt4 book ai didi

c - 缩进 GNU 样式如何在 VIM 中正常运行?

转载 作者:太空宇宙 更新时间:2023-11-04 04:51:00 25 4
gpt4 key购买 nike

我这样写我的函数,

static int
foo_bar(const char *string)
{
}

当我使用 Vim 缩进时,它会做类似的事情,

   static int
foo_bar(const char *string)
{
}

它在static int 之前添加了一些额外的空格。我怎样才能解决这个问题?

最佳答案

我最近才发现这个:

http://thisblog.runsfreesoftware.com/?q=2009/04/20/indent-gnu-style-vim

将其添加到您的 vimrc 并通过键入 == 重新缩进,或者如果您想要缩进 5 行,键入 5==

关于c - 缩进 GNU 样式如何在 VIM 中正常运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15278539/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com