Skip to content

Instantly share code, notes, and snippets.

@afterdesign
Last active October 6, 2015 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save afterdesign/2919906 to your computer and use it in GitHub Desktop.
Save afterdesign/2919906 to your computer and use it in GitHub Desktop.
Sublime Text 2 Settings

Package Control for Sublime Text 2/3

First things first go to http://sublime.wbond.net and install package control.

Sublime settings:

Sublime User Preferences:

{
	"auto_match_enabled": false,
	"caret_extra_width": 2,
	"line_padding_bottom": 2,
	"line_padding_top": 2,
	"margin": 2,
	"overlay_scroll_bars": "enabled",
	"detect_indentation": true,
	"ensure_newline_at_eof_on_save": true,
	"fallback_encoding": "UTF-8",
	"font_size": 12,
	"highlight_line": true,
	"highlight_modified_tabs": true,
	"ignored_packages":
	[
		"Vintage"
	],
	"rulers":
	[
		120
	],
	"scroll_past_end": true,
	"shift_tab_unindent": true,
	"tab_size": 4,
	"color_scheme": "Packages/User/SublimeLinter/Dawn (SL).tmTheme",
	"theme": "Seti.sublime-theme",
	"translate_tabs_to_spaces": true,
	"trim_trailing_white_space_on_save": true,
	"word_wrap": false
}

Sublime User Keymap:

[
    { "keys": ["super+shift+i"], "command": "toggle_side_bar" },
    { "keys": ["super+shift+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} },
    { "keys": ["shift+alt+p"], "command": "prompt_select_project" },
    { "keys": ["super+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} },
    { "keys": ["super+shift+d"], "command": "find_under_expand" },
    { "keys": ["super+shift+e"], "command": "reveal_in_side_bar"},
    { "keys": ["ctrl+alt+f"], "command": "side_bar_find_files_path_containing" },
    { "keys": ["ctrl+t"], "command": "side_bar_new_file2" },
    { "keys": ["alt+shift+8"], "command": "xdebug_breakpoint"},
    { "keys": ["super+alt+8"], "command": "xdebug_conditional_breakpoint"},
    { "keys": ["alt+shift+5"], "command": "xdebug_continue", "args": {"command": "run"}},
    { "keys": ["alt+shift+6"], "command": "xdebug_continue", "args": {"command": "step_over"}},
    { "keys": ["alt+shift+7"], "command": "xdebug_continue", "args": {"command": "step_into"}},
    { "keys": ["alt+shift+9"], "command": "xdebug_continue", "args": {"command": "step_out"}},
    { "keys": ["alt+shift+1"], "command": "xdebug_session_start"},
    { "keys": ["alt+shift+0"], "command": "xdebug_session_stop"},
    { "keys": ["alt+shift+3"], "command": "xdebug_layout", "args": {"keymap" : true}},
    { "keys": ["super+t"], "command": "open_mac_terminal" }
]

Sublime link terminal command

sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/bin/subl

Sublime packages settings:

  1. AutoPep8
  2. CTags
  3. DocBlockr
  4. Jedi - Python autocompletion
  5. MacTerminal
  6. PhpNamespace
  7. PHPUnit Completions
  8. Seti_UI
  9. SideBarEnhancements
  10. SublimeLinter
  11. SublimeLinter-jshint
  12. SublimeLinter-jsxhint
  13. SublimeLinter-phpcs
  14. SublimeLinter-pylint
  15. Xdebug Client

Sublime packages settings:

AutoPep8

{
    "max-line-length": 120,
    "show_output_panel": false,
    "file_menu_search_depth": 10
}

Ctags

{
    "command": "/usr/local/bin/ctags",
    "opts": [
        "--exclude=vagrant",
        "--exclude=node_modules"
    ],
    "extra_tag_paths" :  [
        [["source.python", "osx"], "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tags"]
    ]
}

MacTerminal

{
    "terminal"   :  "terminal",
    "osascript" : "/usr/bin/osascript",
    "debug" : false
}

SublimeLinter

{
    "user": {
        "debug": false,
        "delay": 0.25,
        "error_color": "D02000",
        "gutter_theme": "none",
        "gutter_theme_excludes": [],
        "lint_mode": "background",
        "linters": {
            "jshint": {
                "@disable": false,
                "args": [],
                "excludes": [
                    "*.html.php"
                ]
            },
            "jsxhint": {
                "@disable": false,
                "args": [],
                "excludes": [
                    "*.html.php"
                ]
            },
            "phpcs": {
                "@disable": false,
                "args": [],
                "excludes": [
                    "*.html.php"
                ],
                "standard": "PSR2"
            },
            "pylint": {
                "@disable": false,
                "args": [],
                "disable": "",
                "enable": "",
                "excludes": [],
                "paths": [],
                "rcfile": "",
                "show-codes": false
            }
        },
        "mark_style": "outline",
        "no_column_highlights_line": false,
        "passive_warnings": false,
        "paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "python_paths": {
            "linux": [],
            "osx": [],
            "windows": []
        },
        "rc_search_limit": 3,
        "shell_timeout": 10,
        "show_errors_on_save": false,
        "show_marks_in_minimap": true,
        "syntax_map": {
            "html (django)": "html",
            "html (rails)": "html",
            "html 5": "html",
            "php": "html",
            "python django": "python"
        },
        "warning_color": "DDB700",
        "wrap_find": true
    }
}

Old plugins:

  1. SublimeCodeIntel
  2. Pylinter
  3. Emmet
  4. INI
  5. CoffeeScript
  6. jshintify
  7. Sass
  8. Theme - Nexus
  9. Phpcs

SublimeCodeIntel

Edit file ~/.codeintel/config with:

{
    "PHP": {
        "php": '/usr/bin/php',
        "phpExtraPaths": ["."],
        "phpConfigFile": '/etc/php.ini'
    },
    "Python": {
        "python": '/usr/local/bin/python',
        "pythonExtraPaths": [
            "/Applications/Sublime Text 2.app/Contents/MacOS",
            "/Library/Python/2.7/site-packages",
            "."
        ]
    },
    "Ruby": {
        "ruby": "/Users/afterdesign/.rbenv/shims/ruby",
        "rubyExtraPaths": [
            "/Users/afterdesign/.bower/cache",
            "."
        ]
    },
    "JavaScript": {
        "javascriptExtraPaths": [
            "/Users/afterdesign/.bower/cache",
            "."
        ]
    }
}

Sublime Pylinter User Config

{
    "verbose": false,
    "message_stay" : true,
    "pylint_path": "/Library/Python/2.7/site-packages/pylint/lint.py",
    "pylint_rc": "/Volumes/Users/malinowski/Projects/redsky-linters/Python/pylintrc",
    "run_on_save": true
}

jshintify

{
    "debug" : false,

    "run_on_load" : false,
    "run_on_save" : true,

    "error_messages_show_count" : true,
    "error_messages_show_first" : true,

    "extensions" : [".js"],
    "jshintrc" : "",

    "show_dot" : true,
    "show_outline" : true,

    "paths" : {
        "osx" : {
            "jshint_path" : "/usr/local/bin/jshint",
            "node_path" : "/usr/local/bin/node"
        },
        "windows" : {
            "jshint_path" : "jshint.cmd",
            "node_path" : null
        },
        "linux" : {
            "jshint_path" : "/usr/bin/jshint",
            "node_path" : "/usr/bin/node"
        }
    }
}

Phpcs

{
    "show_debug": false,

    "phpcs_php_path" : "/usr/bin/php",
    "phpcs_executable_path": "/usr/local/bin/phpcs",
    "phpmd_executable_path" : "/usr/local/bin/phpmd",

    "phpcs_additional_args": {
        "--standard": "/Users/afterdesign/Projects/redsky-linters/PHP/ruleset_zf1.xml",
        "-n": ""
    },

    "phpcs_execute_on_save" : true,
    "phpcs_show_errors_on_save" : true,
    "phpcs_show_gutter_marks" : true,
    "phpcs_show_errors_in_status" : true,
    "phpcs_show_quick_panel" : false,
    "phpcs_linter_run" : true,

    "php_cs_fixer_on_save" : false,
    "php_cs_fixer_show_quick_panel" : false,

    "phpmd_run" : false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment