Skip to content

Instantly share code, notes, and snippets.

@chrisamoore
Last active December 22, 2015 16:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisamoore/6501020 to your computer and use it in GitHub Desktop.
Save chrisamoore/6501020 to your computer and use it in GitHub Desktop.
Sublime Settings * req* phpcs, phpmd, php-cs-fixer
{
// http://www.soulbroken.co.uk/code/sublimephpcs/
// //https://github.com/benmatselby/sublime-phpcs/blob/master/example-settings/nix-all-commands.example
"show_debug": true,
"extensions_to_execute" : ".php",
/*
PHPCS
*/
// Show the errors in the quick panel so you can then goto line
"phpcs_show_quick_panel": false,
// It seems python/sublime cannot always find the phpcs application
// If empty, then use PATH version of phpcs, else use the set value
"phpcs_executable_path": "/usr/local/php5/bin/phpcs",
"phpcs_additional_args": {
"--standard": "psr2",
"-n": ""
},
// Are we going to run php -l over the file?
"phpcs_linter_run": true,
// Execute the sniffer on file save
"phpcs_execute_on_save": true,
// Show the error list after save.
"phpcs_show_errors_on_save": true,
// Execute the linter on file save
"phpcs_linter_command_on_save": true,
"phpcs_show_errors_in_status" : true ,
"phpcs_show_quick_panel" : false,
"phpcs_outline_for_errors" :true,
"phpcs_show_gutter_marks" : true,
/*
PHP-CS-FIXER
*/
// Path to where you have the php-cs-fixer installed
"php_cs_fixer_executable_path": "/usr/local/bin/php-cs-fixer",
"php_cs_fixer_show_quick_panel" : false,
"php_cs_fixer_on_save" : false,
"php_cs_fixer_additional_args" : {
"--level" : "psr2"
},
/*
PHPMD
*/
// Execute phpmd
"phpmd_run": true,
// It seems python/sublime cannot always find the phpmd application
// If empty, then use PATH version of phpmd, else use the set value
"phpmd_executable_path": "/usr/local/php5/bin/phpmd",
// Execute the phpmd on file save
"phpmd_command_on_save": true,
"phpmd_additional_args" : {}
}
{
"auto_complete_commit_on_tab": false,
"auto_id_class": true,
"bold_folder_labels": true,
"caret_style": "phase",
"color_scheme": "Cache/Theme - Default/Cam.tmTheme",
"command": "whitespacecorrector",
"create_window_at_startup": false,
"detect_slow_plugins": false,
"draw_minimap_border": false,
"draw_white_space": "selection",
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".DS_Store",
"composer.lock"
],
"find_selected_text": true,
"folder_exclude_patterns":
[
".bundle",
".git",
".sass-cache",
"tmp",
".svn"
],
"font_face": "Droid Sans Mono",
"font_options":
[
"subpixel_antialias"
],
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"R",
"Backbone.Marionette",
"Vintage",
"Java",
"D",
"Erlang",
"Diff",
"Objective-C",
"phpcs",
"Alom",
"Makefile",
"PHP Companion",
"ASP",
"Batch File",
"Backbone.js",
"OCaml",
"Ruby",
"Textile",
"Lua",
"ActionScript",
"reStructuredText",
"C#",
"C++",
"Groovy",
"Clojure",
"Go",
"XSL",
"TCL",
"Yaml",
"Matlab",
"AppleScript",
"Lisp",
"Perl",
"Pretty JSON",
"Rails",
"LaTex",
"Scala"
],
"indent_guide_options":
[
"draw_active"
],
"line_padding_bottom": 2,
"line_padding_top": 3,
"margin": 2,
"open_files_in_new_window": false,
"overlay_scroll_bars": "enabled",
"rulers":
[
120
],
"save_on_focus_lost": true,
"scroll_past_end": false,
"show_full_path": true,
"show_tab_close_buttons": true,
"tab_size": 4,
"theme": "Wombat.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true,
"use_indent_to_bracket": true,
"use_simple_full_screen": false,
"wide_caret": true,
"wombat_color_blue": true,
"wombat_color_expanded_folder": true,
"wombat_dirty_bottom_bar_blue": true,
"wombat_sidebar_tree_small": true,
"wombat_solid_current_tab": true,
"wombat_tabs_medium": true,
"word_separators": "./\\()\"':,.;<>~!@#$%^&*|+=[]{}`~?",
"word_wrap": false
}
/*
SublimeLinter default settings
*/
{
/*
Sets the mode in which SublimeLinter runs:
true - Linting occurs in the background as you type (the default).
false - Linting only occurs when you initiate it.
"load-save" - Linting occurs only when a file is loaded and saved.
"save-only" - Linting occurs only when a file is saved.
*/
"sublimelinter": true,
/*
Maps language names **as listed at the beginning of the README** (but all lowercase)
to executables for non-built in linters. If the executable is not in the default system path,
or on posix systems is not in /usr/local/bin or ~/bin, then you must specify
the full path to the executable. Note that paths in Windows must use double
backslashes, for example "C:\\Program Files (x86)\\nodejs\\node.exe".
Please note that the map _keys_ do not always match the name of the
executable, but rather the language syntax for the executable to lint.
This is the effective default map; your mappings may override these.
"sublimelinter_executable_map":
{
"perl": "perl",
"php": "php",
"ruby": "ruby"
},
*/
"sublimelinter_executable_map":
{
"php": "/usr/local/php5-5.4.16-20130615-025727/bin/php"// "/usr/bin/php"
},
/*
Maps syntax names to linters. This allows variations on a syntax
(for example "Python (Django)") to be linted. The key is
the name of the syntax **as it appears in the syntax list
at the bottom right of the window**, and the value
is the linter name **as listed in the README** (all lowercase)
that the syntax maps to.
*/
"sublimelinter_syntax_map":
{
"Python Django": "python",
"Ruby on Rails": "ruby",
"C++": "c",
"PHP": "php"
},
// An array of linter names to disable. Names should be lowercase.
"sublimelinter_disable":
[
],
/*
The minimum delay in seconds (fractional seconds are okay) before
a linter is run when the "sublimelinter" setting is true. This allows
you to have background linting active, but defer the actual linting
until you are idle. When this value is greater than the built in linting delay,
errors are erased when the file is modified, since the assumption is
you don't want to see errors while you type.
*/
"sublimelinter_delay": 2,
/*
Selects the way the lines with errors or warnings are marked; "outline" draws
outline boxes around the lines, "fill" fills the lines with the outline color,
and "none" (default) disables all outline styles.
*/
"sublimelinter_mark_style": "outline",
/*
If true, lines with errors or warnings will be filled in with the
outline color.
This setting is DEPRECATED and will be ignored in future
versions. Use "sublimelinter_mark_style" instead. For backwards
compatibility reasons, this setting overrides "sublimelinter_mark_style"
if that one is set to "outline", but has no effect if it's set to "none".
*/
"sublimelinter_fill_outlines": false,
// If true, lines with errors or warnings will have a gutter mark.
"sublimelinter_gutter_marks": true,
/*
Choose the theme for gutter marks; available built-in options are:
"alpha", "bright", "dark", "hard" and "simple"
Anything else will be treated as a path to a set of images.
For instance, setting the value to "../User/my-awesome-theme"
would cause SublimeLinter to look for the images:
"../User/my-awesome-theme-illegal.png",
"../User/my-awesome-theme-violation.png",
"../User/my-awesome-theme-warning.png"
These images should all be approximately 32x32px.
*/
"sublimelinter_gutter_marks_theme": "dark",
// If true, the find next/previous error commands will wrap.
"sublimelinter_wrap_find": true,
// If true, when the file is saved any errors will appear in a popup list
"sublimelinter_popup_errors_on_save": false,
// JavaScript linter: "gjslint" to use the closure javascript linter (if available),
// or either "jshint" or "jslint" to use a built in linter.
"javascript_linter": "jshint",
// jshint: options for linting JavaScript. See http://www.jshint.com/docs/#options for more info.
// By deault, eval is allowed.
"jshint_options":
{
// To fix column positions for JSHint errors you may want to add `"indent": 1` to your
// **User** "jshint_options". This issue affects users with tabs for indentation.
// This fix was reverted due to a conflict with using the `"white": true` option.
// "indent": 1,
"evil": true,
"regexdash": true,
"browser": true,
"wsh": true,
"trailing": true,
"sub": true
},
// A list of command line options to send to gjslint. --nobeep is always sent.
"gjslint_options":
[
],
// A list of gjslint error numbers to ignore. The list of error codes is here:
// http://closure-linter.googlecode.com/svn/trunk/closure_linter/errors.py
"gjslint_ignore":
[
110 // line too long
],
// CSSLint options:
// Each rule can have three values: error|warning|true|false
// false => rule is disabled.
// true => alias to 'error'
// All rules are enabled by default.
// Currently the only difference between warnings and errors is in the prefix of the message in the Sublime status bar.
"csslint_options":
{
"adjoining-classes": "warning",
"box-model": true,
"box-sizing": "warning",
"compatible-vendor-prefixes": "warning",
"display-property-grouping": true,
"duplicate-background-images": "warning",
"duplicate-properties": true,
"empty-rules": true,
"errors": true,
"fallback-colors": "warning",
"floats": "warning",
"font-faces": "warning",
"font-sizes": "warning",
"gradients": "warning",
"ids": "warning",
"import": "warning",
"important": "warning",
"known-properties": true,
"outline-none": "warning",
"overqualified-elements": "warning",
"qualified-headings": "warning",
"regex-selectors": "warning",
"rules-count": "warning",
"shorthand": "warning",
"star-property-hack": "warning",
"text-indent": "warning",
"underscore-property-hack": "warning",
"unique-headings": "warning",
"universal-selector": "warning",
"vendor-prefix": true,
"zero-units": "warning"
},
// Set this to false to turn pep8 checking off completely
"pep8": true,
/*
A list of pep8 error numbers to ignore. By default "line too long" errors are ignored.
The list of error codes is in this file: https://github.com/jcrocholl/pep8/blob/master/pep8.py.
Search for "Ennn:", where nnn is a 3-digit number.
*/
"pep8_ignore":
[
"E501"
],
/*
If you use SublimeLinter for pyflakes checks, you can ignore some of the "undefined name xxx"
errors (comes in handy if you work with post-processors, globals/builtins available only at runtime, etc.).
You can control what names will be ignored with the user setting "pyflakes_ignore".
Example:
"pyflakes_ignore":
[
"some_custom_builtin_o_mine",
"A_GLOBAL_CONSTANT"
],
*/
"pyflakes_ignore":
[
],
/*
Ordinarily pyflakes will issue a warning when 'from foo import *' is used,
but it is ignored since the warning is not that helpful. If you want to see this warning,
set this option to false.
*/
"pyflakes_ignore_import_*": true,
/*
Perl linter: "perl" to use the Perl language syntax check, or "perlcritic" to use Perl::Critic linting.
Perl is now set to use "perlcritic" by default due to a vulnerability with blindly running `perl -c`
on files with `BEGIN` or `CHECK` blocks.
*/
"perl_linter": "perlcritic",
// Objective-J: if true, non-ascii characters are flagged as an error.
"sublimelinter_objj_check_ascii": false,
// Set to true to highlight annotations
"sublimelinter_notes": false,
// The set of annotation phrases to highlight
"annotations": ["TODO", "README", "FIXME"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment