You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Colm MacCarthaigh <co...@stdlib.net> on 2005/08/17 06:06:08 UTC

Apache code-style vim tips

Just wondering what vim-users here may be using for help with coding in
the Apache style. Currently I have;

	set tabstop=4
	set shiftwidth=4
 	set expandtab

Which are all reasonably obvious, but thought that others may have
collated the corrent autoindent configurations, trapping of "{" on their
own lines, the preferred comment format, and so on.

-- 
Colm MacCárthaigh                        Public Key: colm+pgp@stdlib.net

Re: Apache code-style vim tips

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
On Wed, Aug 17, 2005 at 05:06:08AM +0100, Colm MacCarthaigh wrote:
> 
> Just wondering what vim-users here may be using for help with coding in
> the Apache style. Currently I have;
> 
> 	set tabstop=4
> 	set shiftwidth=4
>  	set expandtab
> 
> Which are all reasonably obvious, but thought that others may have
> collated the corrent autoindent configurations, trapping of "{" on their
> own lines, the preferred comment format, and so on.

I use autocmd to set the types for C files.

Some relevant snippets:

  " Makefiles ALWAYS must have real TABS
  autocmd FileType make set noet

  let c_syntax_for_h=1
  autocmd FileType c set ts=4 sw=4 et cindent cino=:0(0 fo+=ro

If it helps, my full vimrc is at: http://www.ics.uci.edu/~jerenkra/vimrc

I also do funny things with tab characters and trailing spaces so that
they stick out like sore thumbs.  It ensures that I get annoyed.  ;-)

I'd be curious about what other features vim offers that I'm ignoring...

HTH.  -- justin