Wikia

Vim Tips Wiki

Subversion developer cindent options

Talk0
1,599pages on
this wiki
Revision as of 00:10, October 15, 2008 by JohnBot (Talk | contribs)

Recently created tip

We have not yet decided whether to keep this tip as its own page or merge it somewhere else. If you have a suggestion on the tip content, please edit this page or add your comments below (do not use the discussion page).

Please discuss whether to keep this as a new tip, or whether to merge it into an existing tip, on the new tips discussion page.
created October 7, 2008 · complexity basic · version 7.0

If you are a Subversion developer, you will want Vim to indent according to subversion source code conventions.

Use these commands to setup full svn coding style:

set ts=4 sw=4 expandtab tw=80 fo=tcroq cindent
set isk=a-z,A-Z,48-57,_,.,-,>
set cino=>1s,e0,n-2,f0,{.5s,}0,^-.5s,=.5s,t0,+1s,c3,(0,u0,\ 0

Or, alternatively, this simpler setup might suit you; it only adjusts the indenting when braces or control flow statements are involved:

set noai cin cino={2,>4,n-2

Conformant indenting style for Subversion source looks like this:

  if (maybe == yes)
    do_stuff();
  else
    {
      do_other_stuff();
    }
  more();

See also

Comments

Advertisement | Your ad here

Photos

Add a Photo
103photos on this wiki
See all photos >

Recent Wiki Activity

See more >

Around Wikia's network

Random Wiki