I have a weird problem in which the caret moved in an unexpected way. Let's say I have
test<caret>\n
and type command-], it becomes
<tab>tes<caret>t\n
where "<caret>" indicates the position of the cursor and "<tab>" indicates a tab. Basically the "shift-right" command moved the caret left a position unexpectedly. This problem only shows if there is at least a blank line beneath the "test" line. On the other hand, if I have
<tab>test<caret>\n
then I type command-[, then it becomes
test\n <caret>
where the caret jumps to the next line (while removing the tab correctly). Although it can be argued that this might be preferable under some situations, I would prefer it to remain in the same line. This happens in all syntaxes that I have tried. I renamed my ~/Library/Application Support/Textmate to something else but this is still happening. I imagine that a simple explanation is that the caret pointer stays at the same character count (within the document), without accounting for the newly inserted/removed tab. This might explain both command-] and command-[, but of course it is only a wild conjecture.
Any suggestions? Thanks!