>I'm also not a fan of tab-based indentation, the examples could be a lot more compact (and readable) horizontally if using two-space indentation instead of tabs.
That's the forte of using tabs. Change your display width of tabs to 2 spaces instead of 4.
Tabs for indentation, spaces for alignment.
> Tabs for indentation, spaces for alignment.
And complete mess when someone other than you opens your file :)
Re:JavaScript Patterns Collection
by wyqueshocec on Monday March 18, 2013 @02:02PM
(#5395959)
Is there a way to change the tab width on GitHub's code viewer?
Re:JavaScript Patterns Collection
by themstheones on Monday March 18, 2013 @10:55AM
(#5394525)
Two space indentation is great if you have a CGA monitor and don't have much horizontal room.
Re:JavaScript Patterns Collection
by wyqueshocec on Monday March 18, 2013 @02:02PM
(#5395955)
Also great for viewing the code on GitHub.
Second, they're not .js files, but .html files with (in my opinion) obsolete / unnecessary html boilerplate surrounding it. If it's simply a page to demonstrate / display JS patterns, they should be plain .js files, I think; from what I've seen, those should run equally well in a browser and node.js.
I'm also not a fan of tab-based indentation, the examples could be a lot more compact (and readable) horizontally if using two-space indentation instead of tabs.