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

Re: how to do code beautifier

Expand Messages
  • Tony Mechelynck
    ... Actually, what it said is not that Vim cannot beautify code but that there is no beautify setting that can be set TRUE or FALSE anymore: IIUC, that
    Message 1 of 4 , Aug 28, 2007
    • 0 Attachment
      Mike Hansen wrote:
      >> [mailto:vim_use@...] On Behalf Of Adwin Wijaya
      >>
      >> Hello :)
      >>
      >> I am using gvim 7.0 (for about 1.5 week) and i have a question on how
      >> to do code beautifier with gvim ?
      >> I read the help :help beautify, it said vim doesnt have that option.

      Actually, what it said is not that "Vim cannot beautify code" but that there
      is no 'beautify' setting that can be set TRUE or FALSE anymore: IIUC, that
      setting has been obsoleted by more advanced setting such as those about which
      you can read in the help at:

      :help =
      :help 'equalprg'
      :help gq
      :help 'autoindent'
      :help 'smartindent'
      :help 'indentexpr'
      :help 'cindent'
      :help 'cinoptions'
      :help :filetype-indent-on
      :help :filetype-indent-off
      :help :filetype-overview

      and maybe others.

      >> so how could i do that with vim ? Is there the plugins for that
      >> (especially code beautifer for html, php, javascrpt, css and ruby) ?
      >>
      >> thank you
      >>
      >> adwin
      >
      > I suspect that you'll need to call outside programs that beatify your
      > code. For example, I have a key mapped to call perltidy. map <silent>
      > <F7> :%!perltidy<CR>
      >
      > I know there's a HTMLTidy. I don't know about php, javascript, css, or
      > ruby. You'll probably need to google for programs that do that for
      > those.
      >
      > Mike

      IIUC, HTML Tidy is not "just" a code beautifier, but rather a syntax checker,
      which can even correct some errors (if you tell it to).


      Best regards,
      Tony.
      --
      There was a young lady named Twiss
      Who said she thought fucking a bliss,
      For it tickled her bum
      And caused her to come
      .siht ekil gniyl ylbatrofmoc elihW

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.