Skip to content
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

The lk coding style question #362

Open
ccteam opened this issue Dec 8, 2022 · 3 comments
Open

The lk coding style question #362

ccteam opened this issue Dec 8, 2022 · 3 comments

Comments

@ccteam
Copy link

ccteam commented Dec 8, 2022

Dear lk contributors and reviewers:
I have a simple question: lots of projects use different coding style. For lk history, i found that it uses tab for indent for some time, and some years ago it was changed to "4 spaces indent". Why?

regards,
ocat

@travisg
Copy link
Member

travisg commented Dec 8, 2022

For the most part it's because I kept getting lots of grief from lots of folks about using tab indents since they weren't in style at the time, and so I switch to 4 space indents since that was my preference. Since then I've generally adopted 4 space indents for all my projects since I've grown to like it.

Individual code is free to use whatever it wants, but to be consistent i like to keep the main LK repo in at least one indent style so it doesn't get too messy.

@ccteam
Copy link
Author

ccteam commented Dec 9, 2022

Thanks. We found a question that if using "4 spaces indent", sometimes, if i wrote a wrong indent, wanted to delete the indent(4 spaces). It needs four DELETE key. A better way for this?

@travisg
Copy link
Member

travisg commented Jan 16, 2023

Some code editors support deleting tabs like this, but personally I've just found it to be second nature to delete 4 spaces when using editors that don't have that intelligence. But it is an interesting question: what editors do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants