2011年6月2日星期四

Linux 下的C语言代码排版工具

在Linux下的进行C语言的编程, 有非常不错的代码风格排版工具, 一个是vim 的vimrc 的自定义的参数,  还有一个就是indent 命令了。

下面是我的两个配置文件。

----------------------------------------------------

~.vimrc  的配置参数有

set runtimepath+=~/vimfiles
"set nowrap
set nocompatible
set showcmd
set modelines=5
au GUIEnter * simalt ~x
set guioptions+=t
set guioptions-=T
set so=4
set number
set tabstop=8
set softtabstop=8
"colorscheme ps_color
set nowritebackup
set autoindent
filetype plugin indent on
set backspace=indent,eol,start
set foldmethod=indent
set foldlevel=9999
"set list
set listchars=tab:>-,trail:.,extends:>
set suffixes+=.pyc,.pyo
set shiftwidth=8
set showmatch
set ignorecase smartcase
set incsearch
"set cin
set cino=:0,g0,u0,(0,W4
set fileformat=unix
set ruler
"set visualbell
set iskeyword+=.
set laststatus=2
set fo-=at
syntax on

---------------------------------------

~.indent.pro

 

-nbad -bap -bbo -nbc -bl -bli0 -c33 -cd33 -ncdb
-cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs
-nprs -npsl -saf -sai -saw -nsc -nsob -nss

 

 

-----------------------------------------------