-
Notifications
You must be signed in to change notification settings - Fork 35
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
Can't change tab size. #62
Comments
Hi Linwei! Unfortunately, this cannot be currently customized from within the application. It requires changing the source code and rebuilding Turbo. You have to modify --- a/source/turbo-core/editor.cc
+++ b/source/turbo-core/editor.cc
@@ -31,6 +31,7 @@ Editor::Editor(TScintilla &aScintilla) noexcept :
// Indentation
call(scintilla, SCI_SETUSETABS, false, 0U);
call(scintilla, SCI_SETINDENT, 4, 0U);
+ call(scintilla, SCI_SETTABWIDTH, 4, 0U);
call(scintilla, SCI_SETTABINDENTS, true, 0U);
call(scintilla, SCI_SETBACKSPACEUNINDENTS, true, 0U); Also, if you wish the tabulator key to insert tab characters instead of whitespace characters, also add this change: - call(scintilla, SCI_SETUSETABS, false, 0U);
+ call(scintilla, SCI_SETUSETABS, true, 0U); |
fair, this project is an experiment. I came from a discussion: microsoft/terminal#16440 this project has been mentioned by multiple participants:
Wish this PoC can actually turn into a real editor some day. Before that, can you just set the default tabsize to 4 please ? Default to 8 is unix flavor, not so windows. Turbo C 2.0 and Visual Studio use 4 by default. |
Hi, Lin! I've made up my mind. If the default tab size is 8 and this cannot be customized by the user, then it is very likely that code containing tab characters will look mostly messed up and the user will be able to do nothing. Therefore, I agree to a default tab size of 4 instead. |
Given that this cannot be currently customized by the user, use a value that is less likely to result in code containing tabs looking messed up. See #62.
thanks |
My favorite tabsize is 4, but the default is 8 in turbo, and I can't find a way to change it.
The text was updated successfully, but these errors were encountered: