vim align c file
I want to align c file which is randomly written.
I use the command gg=G, which align the entire c file but unable to adjust within 80 colums. i set the textwidth 80 using following command :set textwidth=80 but unable to align file vertically. Would somebody please help me to find the solution |
I'm not sure what you are looking for, but a program that might help is called "indent". There is a -l option which sets the maximum line length. This program is designed to correctly indent (format) programs written in C to make them more readable. Try "man indent" for more details.
|
You may want the wrap and wrapmargin options http://www.ph.unimelb.edu.au/~ssk/vim/options.html
|
Quote:
Code:
:set indent plugin on Code:
gg=G |
:set paste
before you copy/paste anything :set nopaste to end it hths |
All times are GMT -5. The time now is 09:10 AM. |