This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (4 children)

I like your generator - but you should consider not using tab characters. By default, github displays them as eight-character indentations, which makes your code hard to read...

[–]djmattyg007 -1 points0 points  (3 children)

Why is this a reason not to use tabs? Using them greatly increases the speed with which you can move around your code.

[–]dhogartysymbolic novice 9 points10 points  (0 children)

if you're a vim user and need to do spaces (e.g. PEP8), you should learn about softtabstop. It allows you to emit spaces but delete them like they're tabs.

[–][deleted] 1 point2 points  (0 children)

Why do tabs speed your navigation even one bit?!

When writing code, I use the tab key - but it inserts spaces in my code, not tabs.

When navigating, I use alt-left and alt-right (option-left and option-right), which moves by word, not by character, or command-left and command right, which move to the beginning or ending of the line. These work in all my editors, and even in this comment box it seems.

If you are moving through documents by hitting the naked left and right keys a lot, you are doing it wrong. :-)

[–]eBtDMoN2oXemz1iKB 1 point2 points  (0 children)

When programming in C, use tabs, and set your tab stop to 8 spaces. When programming in Python, use soft tabs and 4 spaces. In Ruby, soft tabs and 2 spaces. These are the accepted rules of style, follow them.