Last active
December 25, 2015 21:39
-
-
Save DominicWatson/7044600 to your computer and use it in GitHub Desktop.
Example code to show tabs and spaces being used for indentation and alignment. To see why tabs don't work for alignement (and spaces do), go into edit mode and change the indent size setting. Watch how the first example breaks and the second does not. The second examples show the advantage of TABS for INDENTATION without breaking alignment when …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- TABS FOR BOTH INDENTATION *AND* ALIGNMENT ---> | |
<cfquery> | |
select column_a, | |
column_b, | |
columb_c | |
from some_table | |
inner join another_table on another_table.id = some_table.another_table | |
</cfquery> | |
<cffunction name="blah"> | |
<cfargument name="blah" type="string" required="true" /> | |
<cfargument name="excellent" type="boolean" required="false" /> | |
</cffunction> | |
<!--- TABS FOR INDENTATION, *SPACES* FOR ALIGNMENT ---> | |
<cfquery> | |
select column_a, | |
column_b, | |
columb_c | |
from some_table | |
inner join another_table on another_table.id = some_table.another_table | |
</cfquery> | |
<cffunction name="blah"> | |
<cfargument name="blah" type="string" required="true" /> | |
<cfargument name="excellent" type="boolean" required="false" /> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment