1
我寫我的功能,如,縮進GNU樣式如何與VIM正確配合使用?
static int
foo_bar(const char *string)
{
}
當我今天使用Vim的縮進,但它確實是這樣,
static int
foo_bar(const char *string)
{
}
它static int
之前添加一些額外的空間。我怎樣才能解決這個問題?
我寫我的功能,如,縮進GNU樣式如何與VIM正確配合使用?
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==
你似乎並沒有想要[GNU風格](http://en.wikipedia.org/wiki/Indent_style#GNU_style),但更像是Allman。不是說我可以看到任何一方的吸引力,但這是你的瞭望。 – dmckee 2013-03-07 18:11:27
您使用什麼縮進? 'filetype'? 'cindent'? 'smartindent'? – 2013-03-07 18:16:45
我想我正在使用'filetype'。我在'.vimrc'中有'filetype plugin indent on' – 2013-03-08 05:47:36