Fresco/contrib/indent fresco.el,NONE,1.1 fresco.pro,NONE,1.1 fresco.vimrc,NONE,1.1
Nathaniel Smith <[email protected]>
| Newsgroups | gmane.comp.video.fresco.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvs/fresco/Fresco/contrib/indent
In directory purcel:/tmp/cvs-serv1067/indent
Added Files:
fresco.el fresco.pro fresco.vimrc
Log Message:
Add all the indent implementations that people have created. They're
not perfect, but a good start.
--- NEW FILE: fresco.el ---
;;; Basic Fresco coding style for Emacs
;;; To use:
;;; 1) load this file, or copy it into your .emacs, or whatever.
;;; 2) then do one of:
;;; 2a) Set the variable c-default-style to "fresco" (using M-x customize
;;; or setq or whatever)
;;; 2b) Use C-c . fresco to set the style manually per-buffer
;;; 2c) Put the following line into a C++ file:
;;; // -*- mode: c++; c-file-style: fresco -*-
;;; Known bugs:
;;; -- uses 4 spaces of indentation for namespaces, instead of 2
;;; -- class access labels are indented 0 spaces, instead of 2
;;; probably lots more of improvements possible, but this is a start
;;; If you find any particular problems or fixes, post to issues.fresco.org.
(c-add-style "fresco"
'((c-basic-offset . 4)
(c-offsets-alist (innamespace . *)
(access-label . /)
(inline-open . +)
(inline-close . 0)
(substatement-open . 0))
(c-hanging-braces-alist (class-close before)
(inline-open nil)
(inline-close after))
(c-hanging-colons-alist (access-label after)
(member-init-intro after))
(c-hanging-semi&comma-criteria
c-semi&comma-no-newlines-for-oneline-inliners
c-semi&comma-inside-parenlist)))
--- NEW FILE: fresco.pro ---
// This file attempts to implement the Fresco style guidelines for
// indent(1).
// To use, copy to ~/.indent.pro, or just set the environment variable
// INDENT_PROFILE to point to it.
// Please reports bugs and improvements at issues.fresco.org.
// Blank lines
--blank-lines-after-declarations
--blank-lines-after-procedures
--blank-lines-before-block-comments
--leave-optional-blank-lines
// Comments
--comment-delimiters-on-blank-lines
--start-left-side-of-comments
// Braces
--braces-after-if-line
--brace-indent0
--dont-cuddle-do-while
--case-indentation0
--case-brace-indentation0
--space-special-semicolon
// Spaces and newlines
--no-space-after-function-call-names
--blank-before-sizeof
--space-after-cast
--space-after-for
--space-after-if
--space-after-while
--no-space-after-parentheses
--no-blank-lines-after-commas // newlines after
commas in function declarations
--procnames-start-lines
--braces-after-struct-decl-line
// Indentation
--indent-level4
--continuation-indentation4
--continue-at-parentheses
--leave-preprocessor-space
// Line length
--line-length78
--- NEW FILE: fresco.vimrc ---
" Fresco VIM Script
" Implements coding guidelines at http://www2.fresco.org/coding-style.html
" general
set tw=78 " textwidth of 78 chars, will break at whitespace
" tabs
set sw=4 " 4 spaces for shiftwidth
set ts=4 " 2 spaces for tabs
set sts=2 " 2 spaces for softtabstop
set expandtab " changes tabs to spaces
" cindent options
set formatoptions=tcqro " this will allow needed C-comment style
set cinoptions=g0.5s,h0.5s,t0
set cindent " indent on cinwords