Wikia

Vim Tips Wiki

Changes: Subversion developer cindent options

Edit

Back to page

(Insert TipProposed template + minor manual clean)
(Assign tip id + convert to TipNew template + minor clean)
 
Line 1: Line 1:
{{TipProposed
+
{{TipNew
|id=0
+
|id=1607
|previous=0
+
|previous=1606
|next=0
+
|next=1608
 
|created=October 7, 2008
 
|created=October 7, 2008
 
|complexity=basic
 
|complexity=basic

Latest revision as of 09:16, April 6, 2009

Tip 1607 Printable Monobook Previous Next

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 alsoEdit

CommentsEdit

Around Wikia's network

Random Wiki