Sublime Text

21 aug. 2012

When switching to sublime version 3, note that the linter plugin has been rewritten and requires a few more steps:
The sublimelinter package is just a framework, and the linters must be installed separately. For python:

  • pep8: for formating
  • pyflakes for unused variables
  • pep257 for docstrings

The modules must also be installed via a terminal window. Use "pip install <pep8|pyflakes|pep357>"

Multiple-cursors-and-incremental-search


Sublime is a text editing software with excellent code highlighting, a nice overview, advanced functions for replacing text (both ordinary and regular expressions) and there are a lot of plugins available.

My steps in customizing usually goes like this:

  • Preferences: Changing the color scheme to "twilight"
  • View: Set line endings to "linux" (under view)
  • View: Add the wrapping ruler at 80 characters
  • Color theme: carlcalderon and theme soda-theme
  • Preferences: Settings - User: Add the rule
    {
    "auto_complete": false,
    "close_windows_when_empty": false,
    "color_scheme": "Packages/Color Schemes by carlcalderon/Tyrann/Tyrann.tmTheme",
    "dictionary": "Packages/Language - English/en_US.dic",
    "draw_white_space": "all",
    "ensure_newline_at_eof_on_save": false,
    "find_selected_text": true,
    "font_face": "Ubuntu Mono",
    "font_options":
    [
    "subpixel_antialias"
    ],
    "font_size": 12,
    "highlight_line": true,
    "ignored_packages":
    [
    "Vintage"
    ],
    "ignored_words":
    [
    "Attr1",
    "Attr2",
    "attr1",
    "attr2",
    "bluetooth",
    "txt"
    ],
    "rulers":
    [
    72,
    79
    ],
    "spell_check": true,
    "theme": "Soda Dark.sublime-theme",
    "trim_trailing_white_space_on_save": true
    }
    (requires restart of sublime)
  • Add package control by entering the code shown in sublime console. The console should be accessible with ctrl+` (on my MAC "CTRL" + "ALT" + "`"), but if that does not work you can find it in the menu view: show console. If successful you'll be asked to restart sublime. Now access it with ctrl+shift+p. Write and open Package Control: Install Package to get to where you can add more plugins.
  • Add the plugin sublimelinter. It will highlight syntax errors.

    I like to remove a few warnings in the preferences: package settings: sublimelinter: settings - user:

    {
    "pep8_ignore":
    [
    "W191",
    "E501"
    ]
    }