Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
The fact that the long line is a counterexample is completely derivative on the fact that omega_1 (the first uncountable ordinal) is a counterexample. Thus, Sam Nead's answer in the comment here is far better.
Well, 2^kappa has the same kind of linear order as 2^omega, namely, the lexical order (smaller = first difference bit is smaller). I agree that the method of this answer doesn't seem to generalize much. To make a direct generalization work for 2^kappa, you would seem to need a subset equinumerous with 2^{<kappa}, to get access to the neighborhoods. But what do you do in the other cases? Is the lexical order rigid if there is no subset equinumerous with 2^{<kappa}? And even if you can handle subsets of 2^kappa for every kappa, I don't see how this handles all sets.