Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?

My Sublime Text 2/3 Configuration

Sublime Package Control of course - http://wbond.net/sublime_packages/package_control

Font

I use the Default Font (don't really know what's the one)

Alternative: Source Code Pro Light from Adobe Source Code Pro.

Theme

Nil Theme

To install do Package Install Theme - Nil.

Alternatives:

Color Theme (syntax highlighting color)

Packages/Color Scheme - Default/Solarized (Dark).tmTheme - (added to Sublime Text 2 with Build 2065 Release Date: 15 June 2011)

Installed Packages

[
{ "keys": ["ctrl+0"], "command": "reset_font_size" }
]
{
"git_binary": "C:\\Git\\cmd\\git.exe"
}
<snippet>
<content><![CDATA[
<!-- Prompt IE 6 users to install Chrome Frame. Remove this if you want to support IE 6.
chromium.org/developers/how-tos/chrome-frame-getting-started -->
<!--[if lt IE 7 ]>
<script defer src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
<script defer>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
<![endif]-->]]></content>
<description>Google AJAX Libraries: Chrome Frame</description>
<scope>text.html</scope>
<tabTrigger>chromeframe</tabTrigger>
</snippet>
<snippet>
<content><![CDATA[<script src="https://ajax.googleapis.com/ajax/libs/jquery/${1:2.0.3}/jquery.min.js"></script>$0]]></content>
<tabTrigger>jquery</tabTrigger>
<description>Google AJAX Libraries: jQuery</description>
<scope>text.html</scope>
</snippet>
<snippet>
<content><![CDATA[<script src="https://ajax.googleapis.com/ajax/libs/swfobject/${1:2.2}/swfobject.js"></script>$0]]></content>
<tabTrigger>swfobject</tabTrigger>
<description>Google AJAX Libraries: SWFObject</description>
<scope>text.html</scope>
</snippet>
<snippet>
<content><![CDATA[
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta charset=utf-8>
<title>${1:title}</title>
<!--[if lt IE 9]> HTML5Shiv
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
${2:body}
</body>
</html>
]]></content>
<tabTrigger>html5</tabTrigger>
</snippet>
{
"cmd": ["node", "$file"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.js"
}
{
//"cmd": ["php", "-l", "$file"], //lint the file
"cmd": ["php", "$file"], //execute the file
"file_regex": "^Parse error: .* in (.*?) on line ([0-9]*)",
"selector": "source.php"
}
{
"ensure_newline_at_eof_on_save": true,
"auto_complete_commit_on_tab": true,
"auto_ident": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Solarized (Dark).tmTheme",
"draw_minimap_border": true,
"fallback_encoding": "UTF-8",
"file_exclude_patterns":
[
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
"*.o",
"*.a",
"*.lib",
"*.so",
"*.dylib",
"*.ncb",
"*.sdf",
"*.suo",
"*.pdb",
"*.idb",
".DS_Store",
"*.class",
"*.psd",
"*.db",
".tags",
".tags_sorted_by_file",
"*.log",
"*.png",
"*.jpg",
"*.jpeg",
"*.gif",
"*.bmp",
"*.pxm",
"*.psd"
],
"gutter": true,
"highlight_line": true,
"highlight_modified_tabs": true,
"hot_exit": false,
"ignored_packages":
[
"Vintage"
],
"indent_guide_options":
[
"draw_normal",
"draw_active"
],
"indent_to_bracket": false,
"remember_open_files": true,
"remember_open_folders": true,
"smart_indent": true,
"tab_size": 4,
"theme": "Nil.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"use_tab_stops": true,
// "font_face": "Source Code Pro Light",
// "font_size": 12.0,
"font_options":
[
"no_bold",
"subpixel_antialias"
],
"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": "load-save",
"sublimelinter_gutter_marks": true, // put a mark before error lines
// 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": false,
"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": false,
"import": "warning",
"important": false,
"known-properties": true,
"outline-none": "warning",
"overqualified-elements": "warning",
"qualified-headings": false,
"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"
},
"jshint_options": {
// documents: http://www.jshint.com/docs/
"curly": true, // always {} around blocks
"eqeqeq": true, // always === and !==
"forin": true, // for-in only iterate through properties owned by object itself
"immed": true, // avoid immediate function without () wrapping
"latedef": true, // avoid lately declaration of variables
"newcap": true, // Capitalized() is considered as initializing a new object, and requires `new'
"noarg": true, // avoid accessing function caller & callee
"noempty": true, // avoid empty-statement blocks
"nonew": true, // avoid invoking `new Constructor()` without l-value
"regexp": true, // avoid `.' in regex pattern
"undef": true, // avoid undeclared variable (e.g. typo)
"unused": true, // warn for unused variables
"trailing": true, // warn for trailing spaces
"maxcomplexity": 5, // warn for high cyclomatic compexity: http://en.wikipedia.org/wiki/Cyclomatic_complexity
// Relaxing Options
"sub": true, // allow `object["property"]'
"supernew": true, // allow `singleton = new function () { ... };'
"expr": true, // this option suppresses warnings about the use of expressions where normally you would expect to see assignments or function calls.
"eqnull": true, //This option suppresses warnings about == null comparisons. Such comparisons are often useful when you want to check if a variable is null or undefined.
// Environments
"browser": true, // treat JavaScripts as if running in client-side
"jquery": true, // jQuery is always there (though I don't like it)
"devel": true, // used for logging poor-man's debugging: console, alert, etc. It is usually a good idea to not ship them in production because, for example, console.log breaks in legacy versions of Internet Explorer.
"node": true,
// The following options override SublimeLint defaults
"evil": false, // [NO RELAX] avoid eval()
"regexdash": false, // [NO RELAX] avoid tailing dash (`-') in regex pattern
"wsh": true // This option defines globals available when your code is running as a script for the Windows Script Host.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment