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

new php auto indent

Expand Messages
  • Robin Wood
    Hi Is it just me or has the way the php auto indent works changed recently? I do a lot of php work and have recently found that I m getting new indents where I
    Message 1 of 5 , Mar 30, 2008
    • 0 Attachment
      Hi
      Is it just me or has the way the php auto indent works changed recently?

      I do a lot of php work and have recently found that I'm getting new
      indents where I didn't before and, worse for me, when I switch out of
      php with a ?> and go to a new line to enter some html the indent drops
      to the start of the line where it used to stay at the same indent
      level. I like to keep my html indented with my php (I didn't use to
      but a boss forced me to do that and now I can't stop) so I'd like to
      go back to the old method. There are also other issues when switching
      between entering php and html with the indents jumping all over the
      place.

      Is there an easy way to switch back or should I just get an indent
      file from an older version of vim and overwrite the new one?

      Robin

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    • Mr Shunz
      ... [snip] ... hi, have a look here: http://vim.wikia.com/wiki/Better_indent_support_for_php_with_html it should fix the issue. cheers -- Daniele Santi .o.
      Message 2 of 5 , Mar 31, 2008
      • 0 Attachment
        >
        > Hi
        > Is it just me or has the way the php auto indent works changed recently?
        >
        [snip]
        > Is there an easy way to switch back or should I just get an indent
        > file from an older version of vim and overwrite the new one?
        >

        hi,
        have a look here:

        http://vim.wikia.com/wiki/Better_indent_support_for_php_with_html

        it should fix the issue.

        cheers

        --
        Daniele Santi .o.
        MrShunz@... ..o |,,,/_
        Linux User #415108 ooo
        ---------------------------------------------------------
        () ascii ribbon campaign - against html mail
        /\ - against microsoft attachments
        ---------------------------------------------------------

        --~--~---------~--~----~------------~-------~--~----~
        You received this message from the "vim_use" maillist.
        For more information, visit http://www.vim.org/maillist.php
        -~----------~----~----~----~------~----~------~--~---
      • John Beckett
        ... Good, but it would be great if someone who understands the issues would fix the tip. Should the body of the tip be deleted and replaced with the version in
        Message 3 of 5 , Mar 31, 2008
        • 0 Attachment
          Mr Shunz wrote:
          > have a look here:
          > http://vim.wikia.com/wiki/Better_indent_support_for_php_with_html
          > it should fix the issue.

          Good, but it would be great if someone who understands the issues would fix
          the tip.

          Should the body of the tip be deleted and replaced with the version in the
          Comments written by Heptite? I'm happy to edit the tip if someone could
          confirm that would be desirable.

          John


          --~--~---------~--~----~------------~-------~--~----~
          You received this message from the "vim_use" maillist.
          For more information, visit http://www.vim.org/maillist.php
          -~----------~----~----~----~------~----~------~--~---
        • Mr Shunz
          ... I personally modified the original indent/php.vim (and then saved it for future uses) as the tip suggested. The solution in the comment is actually more
          Message 4 of 5 , Mar 31, 2008
          • 0 Attachment
            > > have a look here:
            > > http://vim.wikia.com/wiki/Better_indent_support_for_php_with_html
            > > it should fix the issue.
            >
            > Good, but it would be great if someone who understands the issues would fix
            > the tip.
            >
            > Should the body of the tip be deleted and replaced with the version in the
            > Comments written by Heptite? I'm happy to edit the tip if someone could
            > confirm that would be desirable.

            I personally modified the original indent/php.vim (and then saved it
            for future uses) as the tip suggested.

            The solution in the comment is actually more elegant, it simply make
            a local version which includes both original php.vim and html.vim and
            apply the needed modifications. It also has the advantage that survives
            upgrades of the plugin.

            So, yes, i think the best way is that on the comment ...

            btw on vim scripts there are some alternative php.vim to download with
            addeded features, you can check if they suit your needs ...

            --
            Daniele Santi .o.
            MrShunz@... ..o |,,,/_
            Linux User #415108 ooo
            ---------------------------------------------------------
            () ascii ribbon campaign - against html mail
            /\ - against microsoft attachments
            ---------------------------------------------------------

            --~--~---------~--~----~------------~-------~--~----~
            You received this message from the "vim_use" maillist.
            For more information, visit http://www.vim.org/maillist.php
            -~----------~----~----~----~------~----~------~--~---
          • Bram Moolenaar
            ... Please get together with the indent script writer, John Wellesz, and come up with the best version to be included with Vim. -- hundred-and-one symptoms of
            Message 5 of 5 , Apr 1, 2008
            • 0 Attachment
              Daniele Santi wrote:

              > > Hi
              > > Is it just me or has the way the php auto indent works changed recently?
              > >
              > [snip]
              > > Is there an easy way to switch back or should I just get an indent
              > > file from an older version of vim and overwrite the new one?
              > >
              >
              > hi,
              > have a look here:
              >
              > http://vim.wikia.com/wiki/Better_indent_support_for_php_with_html
              >
              > it should fix the issue.

              Please get together with the indent script writer, John Wellesz, and
              come up with the best version to be included with Vim.

              --
              hundred-and-one symptoms of being an internet addict:
              201. When somebody asks you where you are, you tell them in which chat room.

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ download, build and distribute -- http://www.A-A-P.org ///
              \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

              --~--~---------~--~----~------------~-------~--~----~
              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.