-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace with tabulation not working #26
Comments
The reason this isn't working for you is because you must currently have indent with spaces enabled in your view. Sublime, when a tab is inserted at the beginning of a line, will convert it to spaces. If you turn off the indent with spaces settings in your view, it should work fine. Now, the real question is if there is a way for me to always insert without triggering this behavior; I don't know yet. |
I guess it might be possible for me to check the convert tabs to spaces settings, and briefly disable it while I insert and restore the setting after. I will look into that when I have time. |
Thanks for looking into it. In fact, even the characters not located at a beginning of a line are replaced by spaces instead of tabs. But what is strange is that when I use the built-in find and replace function of Sublime Text, if I set the replacement to be \t, it does it the way it should, by inserting tab characters and not spaces. Even with the "indent with space" opt-in. |
Yeah, turns out that "indent with spaces" option converts tabs mid line too. So as to why it standard find and replace doesn't have this issue, it is because I am going through the API. And the |
You're not to blame! But that's true that for me, your excellent tool is used to sequence "find and replace" instead of the built-in one, that includes righteously the tab character. Anyway thanks again for looking into it. And sorry for the "inception" of this issue in your mind... |
Fix is found here c06390a. It will be included in the next release. |
Yeah that's great! Thanks alot, when do you think the next release will be? |
Done |
Thanks a lot! But Package Control is stuck with v.1.9.0, do you know why ? |
Damn it! I'm using Sublime Text 2, and I've just understood what ST3 stands for in front of the version. Woe with me! |
You should upgrade to ST3 😉. It's just too much work for me to support all the plugins I have, and then do it for 2 separate versions of ST. I don't even use ST2 anymore. With that said, the needed changes are found right there in the commit. You can modify it yourself for ST2 if you are resistant to upgrading. I don't mind people backporting ST3 features to the ST2 branch, I am just not going to personally do it anymore. |
I understand, unfortunately ST3 being still in beta phase, I can't afford to switch in a production environment. But as soon as it's officially released, I'll upgrade. Meanwhile, I'll try to backport your commit. Thanks again. |
Backporting successful! Many thanks. |
If you have it all working, I would accept a pull request to make it official. I accept backport pull requests for ST2, I just won't accept new features or changes on 2 unless it is first accepted and implemented on the main branch. |
Done |
@letatas Did you pull request it on your own repo? I don't see the pull request on my repo. |
Backporting issue facelessuser#26 to ST2
Ooops... My bad... It's late over here... It should be ok by now. |
Hello,
I'm trying to replace spaces with tabs, but unfortunately this doesn't work:
I've also tried
"\t"
which also failed.Any idea?
Thanks in advance.
The text was updated successfully, but these errors were encountered: