EditorConfig

I just used EditorConfig for the first time on a project, and it seems like something that will be very useful, especially for team development. What is EditorConfig? Here’s the description from the website:

EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs.

EditorConfig allows you to specify the type and size of tabs used on a project, as well as things like character set and line endings. In a supported editor1, the rules specified in the .editorconfig file will execute when saving the file, making sure the formatting of the file is consistent. It even allows you to configure file extensions separately for languages that have specific requirements that may differ from your default settings.

Using EditorConfig eliminates the need to modify your editor preferences when switching between projects. For example, I’ve always preferred hard tabs, but everyone on my team at work uses soft tabs. You can just add the .editorconfig to a git repository, and everyone who works on the project can be using consistent formatting.

Here is my current .editorconfig file:

# EditorConfig (http://editorconfig.org)

# Set this as the root EditorConfig file
root = true

# Default settings for all files
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = space
indent_size = 4

  1. My editor of choice has been Coda for the past couple years, but it does not yet have EditorConfig support. I’ve been trying out a few other editors, including TextMate and the new GitHub Atom editor. You can find a list of supported editors on the EditorConfig website. 

iTunes MiniPlayer in Full Screen Mode

When using iTunes, I often like to have the app running in full screen mode so that it doesn’t clutter my desktop. When I do this, I also like to have the MiniPlayer open so that I can easily change songs without switching back to the main iTunes window.

Just switching to the MiniPlayer will hide the main window, but I would like to have open at the same time. I found some instructions on how to do this, but I am noting the steps below as I’ve had trouble accessing that page in the past.

  1. Exit out of full screen mode.
  2. Set iTunes to show on all desktops by right clicking (or control + click) on the iTunes icon in the dock and selecting “All Desktops” under the Options menu.
  3. Open the MiniPlayer from the Window menu at the top of the screen.
  4. Enter full screen mode by clicking the full screen button at the top right of the main iTunes window (also found under the View menu).