Register
It is currently Thu Feb 22, 2018 10:34 am

Fix php indentations with vim / or / simple indenting w/vim.


All times are UTC


Post new topic Reply to topic  [ 1 post ] 
Author Message
 PostPosted: Thu Aug 30, 2012 8:47 pm   
Site Admin
User avatar

Joined: Thu Apr 17, 2003 3:44 am
Posts: 12300
Location: Iowa
Your vim tip for the day....

Fix php indentations with vim.

Open .php file in vim.

:set ft=phtml

THEN

gg=G

Works with other file types too, just change the ft=phtml to ft=WHATEVER and tada, indentations fixed. ;)

_________________

Zbook (Laptop)- Mint 18 64-bit - I7-4800mq - 32GB ram
Phantom (Desktop)- Mint 64-bit - i7-5770 - 32GB ram
Nas4Free (NAS) - 6X3TB File Server.
Sky (HP BladeCenter) - 16 blades - 536 GB ram-G7/G6/G5 blades.


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


Powered by phpBB © 2012 phpBB Group
© 2003 - 2012 USA LINUX USERS GROUP