CodeIgniter Forums
Codeigniter inserting tabs into markup. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Codeigniter inserting tabs into markup. (/thread-38460.html)



Codeigniter inserting tabs into markup. - El Forum - 02-08-2011

[eluser]Jeromy[/eluser]
I've noticed that in outputting my markup, Codeigniter is also outputting all of the tabs I use for indentation in my code. This results in a large amount of extra whitespace in my markup. I use notepad++ as my coding environment, and the extra whitespaces are output the same in the source in all browsers.

I found in the core where \n and \r are dealt with, but is there a place where \t is dealt with? It doesn't affect the performance of my code, it just looks like crap.

And it's all about the looks right?

Thanks in advance.
Jeromy


Codeigniter inserting tabs into markup. - El Forum - 02-08-2011

[eluser]intractve[/eluser]
CodeIgniter does nothing to your view except pipe it to the browser (optionally with caching) so if you do not want your indentations in your view, you gotta remove them in your view file. If I am not mistaken, the core just uses the \n , \r etc. just to ensure that the output is the same as your view file. I could be wrong. But I usually do not have to worry about people looking at my source code so our scenarios may vary.


Codeigniter inserting tabs into markup. - El Forum - 02-08-2011

[eluser]InsiteFX[/eluser]
Sounds like your editor is inserting the tabs in your source code!

Check your editor settings!

InsiteFX


Codeigniter inserting tabs into markup. - El Forum - 02-08-2011

[eluser]Jeromy[/eluser]
Yep. Its the editor... I justed switched to notepad++ from DW after realizing what bloated crud it is. I think i've got it figured out now. Thanks for the responses!


Codeigniter inserting tabs into markup. - El Forum - 02-08-2011

[eluser]Jaketoolson[/eluser]
I've taken over projects from others who used Notepad++. At first glance, there didn't appear to be excessive spacing/tabs, until I opened them up in Eclipse IDE! It was a nightmare and frusterating!


Codeigniter inserting tabs into markup. - El Forum - 02-08-2011

[eluser]Jeromy[/eluser]
Is there an ide that you would recommend? I'm tired of all the bloat in these programs. I just want textmate or coda on my pc...


Codeigniter inserting tabs into markup. - El Forum - 02-08-2011

[eluser]mdgrech[/eluser]
eText Editor! Textmate for windows, its awesome! There live edit feature is the best I've ever used btw.