2013-03-07 39 views
1

我寫我的功能,如,縮進GNU樣式如何與VIM正確配合使用?

static int 
foo_bar(const char *string) 
{ 
} 

當我今天使用Vim的縮進,但它確實是這樣,

static int 
foo_bar(const char *string) 
{ 
} 

static int之前添加一些額外的空間。我怎樣才能解決這個問題?

+0

你似乎並沒有想要[GNU風格](http://en.wikipedia.org/wiki/Indent_style#GNU_style),但更像是Allman。不是說我可以看到任何一方的吸引力,但這是你的瞭望。 – dmckee 2013-03-07 18:11:27

+1

您使用什麼縮進? 'filetype'? 'cindent'? 'smartindent'? – 2013-03-07 18:16:45

+0

我想我正在使用'filetype'。我在'.vimrc'中有'filetype plugin indent on' – 2013-03-08 05:47:36

回答