I'm looking for a indent application to fix all aspects of PHP code formatting - convert spaces, perform indentation in PHP and HTML code, leave HEREDOC alone, etc.
Please recommend a decent indenter for PHP.
find . -name '*.php' -printf "echo -e \"G=gg\n:wq\n\" | vim %p\n" | sh
I have found few things. First, the best way to mass-edit files is to use bash scripting and vim.
Second, vim indentation is not perfect and is not working always. So I had to rather do "=G" manually then review the source.
Finally, vim's command "retab" in collaboration with tab settings is great if only looking to change white-spaces into tabs.
I'd like to also point towards an awesome podcasts where I learned more about Vim:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With