Action | Windows | Linux | Mac |
---|---|---|---|
Jump to definition | Alt + Left Mouse Click | Super + Left Mouse Click | Control + Left Mouse Click |
Jump to definition | Ctrl + Win + Alt + Up | Ctrl + Super + Alt + Up | Control + Command + Option + Up |
Go back | Ctrl + Win + Alt + Left | Ctrl + Super + Alt + Left | Control + Command + Option + Left |
Manual Code Intelligence | Ctrl + Shift + Space | Ctrl + Shift + Space | Control + Shift + Space |
Pour ajouter des librairies additionnelles, tel que Django, ou bien des chemins supplémentaire vers les fichiers JavaScript .js
, on peut éditer un fichier de configuration situé à ~/.codeintel/config
pour Mac/Linux et C:\Users\{userame}\.codeintel\config
sur Windows. Par défaut, ce fichier est un fichier JSON vide. Voici un exemple de configuration optionnelle :
{ "PHP": { "php": '/usr/bin/php', "phpExtraPaths": [], "phpConfigFile": 'php.ini' }, "JavaScript": { "javascriptExtraPaths": [] }, "Ruby": { "ruby": "/usr/bin/ruby", "rubyExtraPaths": [] }, "Python": { "python": '/usr/bin/python', "pythonExtraPaths": [ "/usr/local/lib/python2.7/site-packages " ] } }
Langage | Outil(s) |
---|---|
C/C++ | This lints via cppcheck |
CoffeeScript | This lints via coffee –s –l |
CSS | This lints via built-in csslint |
Haml | This checks syntax via haml –c |
HTML | This lints via tidy |
Java | This lints via javac –Xlint |
JavaScript | This lints via built in jshint , jslint , or gjslint (if installed) |
Lua | This checks syntax via luac |
Objective-J | This lints via built in capp_lint |
Perl | This lints via Perl::Critic or syntax and deprecation check via perl-c |
PHP | This checks syntax via php –l |
Puppet | This checks syntax via puppet parser validate |
Python | This is a native, moderately-complete lint |
Ruby | This checks syntax via ruby –wc |
XML | This lints via xmllint |
Pour utiliser les linters, il faut configurer les chemins. Aller dans Preferences → Package Settings → SublimeLinter → Settings - User.
Dans ce fichier, le path
windows
peut être configuré vers l'installation de PHP:
"paths": { "linux": [], "osx": [], "windows": [ "C:/Program Files (x86)/PHP/" ] },
Aussi, en installant node.js, il peut être utilisé pour vérifier les fichiers Javascript et CSS. La configuration devra ressembler à :
"sublimelinter_executable_map": { "css": "C:/Program Files/nodejs/node.exe", "javascript": "C:/Program Files/nodejs/node.exe", "php": "C:/Program Files (x86)/PHP/php.exe" },
Suite à cette configuration, redémarrer Sublime.
"sublimelinter_executable_map": { "html": "C:\\Program Files\\Html Tidy\\tidy.exe" }
Emmet (previously known as Zen Coding) is a web-developer’s toolkit that can greatly improve your HTML & CSS workflow.
{ "disabled_single_snippet_for_scopes": "text.xml", "disabled_single_snippets": "locale" }
{ "trailing_spaces_highlight_color": "invalid", "trailing_spaces_include_empty_lines" : true, "trailing_spaces_include_current_line": false, "trailing_spaces_modified_lines_only": true, "trailing_spaces_trim_on_save": true }
Pour faire en sorte que le … qu'on appelle Track Active Item in Project Folders.
{ "tfs_path": "C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\TF.exe", "tfpt_path": "C:\\Program Files (x86)\\Microsoft Team Foundation Server 2010 Power Tools\\TFPT.exe" }
Dans Preferences → Key Binding - User, ces raccourcis clavier peuvent être ajoutés:
{"keys": ["ctrl+shift+o"], "command": "tfs_checkout"}, {"keys": ["ctrl+shift+i"], "command": "tfs_checkin"}
{ "keys": ["ctrl+shift+r"], "command": "browser_refresh", "args": { "auto_save": true, "delay": 0.5, "activate_browser": true, "browser_name" : "Google Chrome" } },