LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   indentation html file (https://www.linuxquestions.org/questions/linux-newbie-8/indentation-html-file-625969/)

ufmale 03-05-2008 03:07 PM

indentation html file
 
I copied a html file from the internet to a file using vi editor. All the indentation seems to be out of order. Is there a way to indent them correctly? Can the same technique apply to java, c code files?

Mara 03-05-2008 03:11 PM

You can try indent. It has huge number of options and allows you to change formatting to nearly every possible. Works for any text file.

Tinkster 03-05-2008 03:42 PM

Quote:

Originally Posted by ufmale (Post 3079273)
I copied a html file from the internet to a file using vi editor. All the indentation seems to be out of order. Is there a way to indent them correctly? Can the same technique apply to java, c code files?

Not sure how good vi's indentation rules for HTML are, but
usually (in vim, at least) you can highlight the lot and
press =

If that doesn't quite cut it for HTML (I know it does for
C and Perl, for example) you could use tidy for those files.



Cheers,
Tink


All times are GMT -5. The time now is 05:50 PM.