Tools for relative line length limits
Python Shell
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Tools for relative line length limits

This is an experiment between design and code. In typography, there is a notion of the ideal amount of characters for a line which enables maximum readability.

I wanted to take this concept and apply it to code. Assuming that whitespace cannot be considered part of the line, we arrive at a need for relative line length tools. sublime-optimal-lines fills this gap:

Outline screenshot

Getting Started

sublime-optimal-lines can be installed via via the following command in the Sublime Text terminal (ctrl+`) which utilizes git clone.

import os; path=sublime.packages_path(); (os.makedirs(path) if not os.path.exists(path) else None); window.run_command('exec', {'cmd': ['git', 'clone', '', 'optimal-lines'], 'working_dir': path})

Packages can be uninstalled via "Package Control: Remove Package" via the command pallete, ctrl+shift+p on Windows/Linux,command+shift+p on Mac.


sublime-optimal-lines provides a few settings for customization

  // Specify amount of characters for relative line limit (default: 75)
  "relative_line_limit": 100


In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.


Support this project and others by twolfson via gittip.

Support via Gittip


Copyright (c) 2013 Todd Wolfson

Licensed under the MIT license.