crosbymichael / vim-cfmt

Vim plugin for automatic formatting of C source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vim-cfmt

A vim plugin using gnu indent to auto format C source code.

You will need to install indent on your system to use this plugin. If you are on a debian based system you can use apt to install it.

apt-get install indent

Install using Pathogen or Vundle then set this in your vimrc:

autocmd BufWritePre *.c,*.h Cfmt

You can configure the style of formating by using the g:cfmt_style variable.

let g:cfmt_style = '-linux'
let g:cfmt_style = '-kr'
let g:cfmt_style = '-gnu'

License

Distributed under the same terms as Vim itself. See :help license.

About

Vim plugin for automatic formatting of C source code


Languages

Language:Vim Script 100.0%