This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][REPL] Change the default tab size
ClosedPublic

Authored by wallace on Aug 27 2023, 11:42 AM.

Details

Summary

The REPL has a default tab size of 4 spaces, which seems to be a bit too much. The reason is that the REPL transforms tabs into spaces, and therefore whenever you want to manually deindent, you need to delete at least 4 characters. On the other hand, using 2 as default results in less keystrokes, without hurting readability.

Diff Detail

Event Timeline

wallace created this revision.Aug 27 2023, 11:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2023, 11:42 AM
wallace requested review of this revision.Aug 27 2023, 11:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2023, 11:42 AM
wallace updated this revision to Diff 553804.Aug 27 2023, 11:45 AM

I have no problem with this conceptually. I'm not sure if there are any caveats or other things that need to be updated though, so please wait for more input before landing

+ @aprantl for impact on the Swift REPL

aprantl accepted this revision.Aug 28 2023, 9:11 AM

This should probably be a language-specific setting, but I see no problem in doing it this way right now, since there is practically only one language.
Please update any REPL tests on the Swift branch that need updating when cherry-picking though.

This revision is now accepted and ready to land.Aug 28 2023, 9:11 AM

@aprantl, how should I proceed with the swift branch? Should I create a new branch in https://github.com/apple/swift and share it here so it's available for whoever does the merge?

wallace closed this revision.Aug 28 2023, 3:46 PM

@aprantl, how should I proceed with the swift branch? Should I create a new branch in https://github.com/apple/swift and share it here so it's available for whoever does the merge?

Actually, I can just cherry-pick it myself, let's not worry about this.