![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Indent Finder 1.31 (Default branch) | iBot | Software Releases - RSS News | 0 | 09-07-2008 09:30 PM |
| Indent Finder 1.3 (Default branch) | iBot | Software Releases - RSS News | 0 | 07-20-2008 10:50 PM |
| [non-important] Indent here-docs? | yongho | UNIX for Dummies Questions & Answers | 4 | 06-21-2005 11:51 AM |
| vim indent | Virtuosso | UNIX for Dummies Questions & Answers | 4 | 02-06-2003 05:15 PM |
| Auto indent in vi | sierra_aar | UNIX for Dummies Questions & Answers | 1 | 06-19-2002 11:36 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
|
|
||||
|
vi auto indent whole file at once
Hi,
I'm working on a big project and all the CPP and header files are in mess with respect to indentation. I would like to indent whole file(s) at once (like ctrl-shift-f in eclipse). Is there anybody who knows how to do that in vi/vim? thanks Last edited by SaTYR; 10-30-2008 at 08:26 PM.. |
|
||||
|
In vim, the = command formats C code. Try going to the first line and hitting =G.
You may also want to :set cindent to get some automatic formatting happening while you edit code. And possibly :set sw=4 if you only want to indent by 4 characters, etc. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|