From the course: Kotlin for Android: Best Practices

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

EditorConfig

EditorConfig - Kotlin Tutorial

From the course: Kotlin for Android: Best Practices

Start my 1-month free trial

EditorConfig

- [Instructor] Before we go into Kotlin specific ways to make your code better, I would like to address one universal way that can make your code more readable, and that's coding style. Especially when you're working in the team, if your code keep changing from two space and down to four space indent, and the colored braces are sometimes on the same line or on a new line, it can get very confusing. One tool I find very useful, is EditorConfig. EditorConfig allows you to check in a config file alongside your repository, so that every time when someone loads it up into an IDE, they can use the exact same style that you've defined. On the website, you can see the syntax is fairly simple. It's some key value pairs, that allows you to define, for example, indent style, to be using space and indent style, to be four size or two size. And the nice thing is that in Teljay, and therefore Android Studio, has EditorConfig built in. To make sure that Android Studio honors their EditorConfig file,…

Contents