+6

When "Indent Using Spaces" is enabled, it is impossible to insert a real tab

Justin Bradford 12 лет назад 0

When the "Indent Using Spaces" option is enabled, I can't insert a real tab. I've tried adding a unique keybinding to insert a "\t" (like shift+tab, but without contextual alternatives for unindent, tab completion, etc), but it still gets converted into spaces (even when the insertion point is in the middle or at the end of a line).


This becomes a problem when I need to insert a real tab into file that has "Indent Using Spaces" enabled (e.g. a source file that is space-indented and I need to put a real tab in a string).


Also, since I default to indentation using spaces (IUS), any file without any line of leading indentation (e.g. a TSV -- tab-separated file) will default to IUS and thus not let me insert a real tab anywhere.


It seems the characters inserted by the "insert" command do not trigger other keybindings, but they do go through the IUS-phase of processing. Perhaps you could add a "literal_insert" command that bypasses the IUS-phase?


Also, many other text editors have a command that makes the next key be inserted as a literal. I'm content with a literal insert command, as I can add my own keybindings, but a more general solution might also be worth considering.


Anyway, thank you for writing Sublime Text 2. It's really rather amazing. In my opinion, the whole emacs/vi holy war is an obnoxious bug splattered on ST2's windshield. :)


I do hope you consider opening up the source, though. With your unlimited trial, I doubt it'll affect sales significantly, but I would definitely consider a custom license forbidding redistribution of any derived source in binary form and requiring all pull requests/patches to grant you copyright.

Сервис поддержки клиентов работает на платформе UserEcho