Loading ...
Sorry, an error occurred while loading the content.

reformating html

Expand Messages
  • michal
    Hello, is it possible to make reformated nice html (nested HTML source code) of edited file in VIM? Is it possible to reformat only selected part of file?
    Message 1 of 2 , Feb 28, 2005
    • 0 Attachment
      Hello,
      is it possible to make reformated "nice html" (nested HTML source code) of edited file in VIM? Is it possible to reformat only selected part of file?

      Thanks
      Michal
    • Mathias Michaelis
      Hello Michal ... You can go into linewise visual mode (Shift-V) and mark the part of the code that should be properly intended. Then you can: a) press the key
      Message 2 of 2 , Feb 28, 2005
      • 0 Attachment
        Hello Michal

        > is it possible to make reformated "nice html" (nested HTML source
        > code) of edited file in VIM? Is it possible to reformat only
        > selected part of file?
        >
        You can go into linewise visual mode (Shift-V) and mark the part of
        the code that should be properly intended. Then you can:

        a) press the key =

        b) press the key ! and then type in the command of an external
        html-tidy program.

        Alternatively you can press gg=G or :%! plus external command to
        clean up the whole file at once.

        I know two external commands: xmllint (on Linux or with gnuwin32 or
        cygwin) and Dave Raggett's HTML Tidy (http://tidy.sourceforge.net/).

        A view day ago, there was already a similar thread "XML Indentation"
        on this list. See

        http://marc.theaimsgroup.com/?l=vim&m=110925581023161&w=2

        and press [next in thread] a view times.

        With kind regards
        Mathias
      Your message has been successfully submitted and would be delivered to recipients shortly.