« Sublime text » : différence entre les versions
Apparence
Aucun résumé des modifications |
|||
| (25 versions intermédiaires par le même utilisateur non affichées) | |||
| Ligne 1 : | Ligne 1 : | ||
== intégration sass == | |||
<pre> | |||
Tools - build system -> new build system | |||
{ | |||
"osx": | |||
{ | |||
"path": "/usr/local/bin:$PATH", | |||
"cmd" : [ | |||
"sass", | |||
"--update", | |||
"${file_path}/$file_base_name.scss:${file_path}/../css/$file_base_name.css", | |||
"--stop-on-error", | |||
"--style", | |||
"expanded", | |||
], | |||
"selector": "source.sass, source.scss", | |||
"line_regex": "Line ([0-9]+):", | |||
}, | |||
"windows": | |||
{ | |||
"shell": "true" | |||
} | |||
} | |||
</pre> | |||
Save in<br> | |||
/Users/XXX/Library/Application Support/Sublime Text | /Users/XXX/Library/Application Support/Sublime Text 3/Packages/User | ||
Dans le fichiers .scss executer le build avec<br> | |||
tools -> build system -> le fichier nouvellement créé | tools -> build system -> le fichier nouvellement créé | ||
[[category:Dev]] | |||
[[category:Softz]] | |||
== Commandes == | |||
* | * | ||
* Clic molette : sélection verticale | * Clic molette : sélection verticale | ||
| Ligne 46 : | Ligne 72 : | ||
SublimeOnSaveBuild | SublimeOnSaveBuild | ||
ApacheConf | ApacheConf | ||
</pre> | |||
source:http://blog.goetter.fr/post/24671859680/sublime-text-2-raccourcis-et-plugins | source:http://blog.goetter.fr/post/24671859680/sublime-text-2-raccourcis-et-plugins | ||
---- | |||
view -> show console<br> | |||
paste | |||
<pre> | |||
import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation') | |||
restart Sublime Text. | |||
</pre> | |||
Press Command-Shift-P | |||
source:http://www.granneman.com/webdev/editors/sublime-text/packages/how-to-install-and-use-package-control/ | |||
<pre> | |||
package: | |||
ApacheConf.tmLanguage | |||
Emmet | |||
Sass | |||
SASS Build | |||
SublimeOnSaveBuild | |||
SublimeLinter | |||
</pre> | |||
== User Settings == | |||
<pre> | |||
{ | |||
"color_scheme": "Packages/Color Scheme - Baara Dark/Baara Dark.tmTheme", | |||
"ensure_newline_at_eof_on_save": true, | |||
"font_size": 12, | |||
"highlight_line": true, | |||
"highlight_modified_tabs": true, | |||
"ignored_packages": | |||
[ | |||
"Vintage" | |||
], | |||
"show_panel_on_build": true, | |||
"tab_size": 4, | |||
"theme": "Adaptive.sublime-theme", | |||
"trim_trailing_white_space_on_save": true | |||
} | |||
</pre> | |||
== Packages User == | |||
<pre> | |||
Personnaliser une couleur : | |||
par exemple "line_highlight" => sur-brillance de la ligne en cours | |||
- créer un fichier "Nom du Theme.sublime-color-scheme" | |||
- et ajouter | |||
{ | |||
"globals": | |||
{ | |||
"line_highlight": "#333333", | |||
} | |||
} | |||
- Dans ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Nom du Theme.sublime-color-scheme | |||
* chercher un scope => view.style_for_scope("line_highlight") ou view.style_for_scope("highlight_line") | |||
</pre> | </pre> | ||
[[category:softz]] | |||
== Custom Perso == | |||
build 4200 | |||
=== Settings === | |||
Package Control.sublime-settings | |||
<syntaxhighlight lang="json" line> | |||
{ | |||
"bootstrapped": true, | |||
"in_process_packages": | |||
[ | |||
], | |||
"installed_packages": | |||
[ | |||
"Alignment", | |||
"ApacheConf", | |||
"ColorPicker", | |||
"GitHub Theme", | |||
"Json Colors And Navigation", | |||
"JSON Reindent", | |||
"Package Control", | |||
"Pretty JSON", | |||
"Sass", | |||
"SqlBeautifier", | |||
"SublimeLinter-php", | |||
"Terminal", | |||
"Twig", | |||
], | |||
} | |||
</syntaxhighlight> | |||
Preferences.sublime-settings | |||
<syntaxhighlight lang="json" line> | |||
{ | |||
"ignored_packages": | |||
[ | |||
"Vintage", | |||
], | |||
"theme": "GitHub Dark.sublime-theme", | |||
"color_scheme": "Monokai.sublime-color-scheme", | |||
"index_files": true, | |||
"font_size": 14, | |||
} | |||
</syntaxhighlight> | |||
=== Key Bindings === | |||
<syntaxhighlight lang="json" line> | |||
[ | |||
{ "keys": ["ctrl+shift+j"], "command": "pretty_json" }, | |||
{ "keys": ["ctrl+m"], "command": "sql_beautifier" }, | |||
{ "keys": ["super+t"], "command": "transpose" }, | |||
{ "keys": ["super+shift+t"], "command": "reopen_last_file", "args": {"source": "window"} }, | |||
{ "keys": ["ctrl+t"], "command": "open_terminal"}, | |||
{ "keys": ["ctrl+shift+t"], "command": "open_terminal_project_folder" }, | |||
{ "keys": ["ctrl+0"], "command": "reset_font_size" } | |||
] | |||
</syntaxhighlight> | |||
[[category:softz]] [[category:Dev]] | |||
Dernière version du 20 octobre 2025 à 11:28
intégration sass
Tools - build system -> new build system
{
"osx":
{
"path": "/usr/local/bin:$PATH",
"cmd" : [
"sass",
"--update",
"${file_path}/$file_base_name.scss:${file_path}/../css/$file_base_name.css",
"--stop-on-error",
"--style",
"expanded",
],
"selector": "source.sass, source.scss",
"line_regex": "Line ([0-9]+):",
},
"windows":
{
"shell": "true"
}
}
Save in
/Users/XXX/Library/Application Support/Sublime Text 3/Packages/User
Dans le fichiers .scss executer le build avec
tools -> build system -> le fichier nouvellement créé
Commandes
- Clic molette : sélection verticale
- Ctrl + Shift + P : Commandes
- Ctrl + P : Accès rapide aux fichiers
- Ctrl + G : Accès au numéro de ligne
- Ctrl + R : Accès direct par terme (par ex liste des sélecteurs en CSS)
- Ctrl + Shift + D : Dupliquer une ligne
- Ctrl + Shift + F : Recherche dans les fichiers du projet
- Ctrl + H : Remplacer
- Ctrl + X : Supprimer la ligne
- Ctrl + Shift + / : Mettre en commentaires (PHP, HTML, …)
- Ctrl + D : Sélectionner l’occurrence identique suivante
- Alt + F3 : Sélectionner toutes les occurrences (génial !)
- Ctrl + Shift + M : Sélectionner tout entre les parenthèses/accolades
- Ctrl + PageUp/PageDown : Se déplacer dans les onglets
- Ctrl + Shift + T : Réouvrir le dernier onglet fermé
- Alt + Shift + 1/2/3/4/5 : Vues splittées
- Ctrl + F2 : Placer un signet
- F2 : Aller au signet suivant
- Ctrl + KU : Met le texte sélectionné en uppercase
- Ctrl + KL : Met le texte sélectionné en lowercase
- F9 : tri par ordre alphabétique
package control
Emmet: taper du css pour l'ecrire en html Hayaku: abbrévation css ex: m10 (tab) : margin:10px PyV8: p sass sublimelinter : color error Sass Build SublimeOnSaveBuild ApacheConf
source:http://blog.goetter.fr/post/24671859680/sublime-text-2-raccourcis-et-plugins
view -> show console
paste
import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
restart Sublime Text.
Press Command-Shift-P
package: ApacheConf.tmLanguage Emmet Sass SASS Build SublimeOnSaveBuild SublimeLinter
User Settings
{
"color_scheme": "Packages/Color Scheme - Baara Dark/Baara Dark.tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_size": 12,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"show_panel_on_build": true,
"tab_size": 4,
"theme": "Adaptive.sublime-theme",
"trim_trailing_white_space_on_save": true
}
Packages User
Personnaliser une couleur :
par exemple "line_highlight" => sur-brillance de la ligne en cours
- créer un fichier "Nom du Theme.sublime-color-scheme"
- et ajouter
{
"globals":
{
"line_highlight": "#333333",
}
}
- Dans ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/Nom du Theme.sublime-color-scheme
* chercher un scope => view.style_for_scope("line_highlight") ou view.style_for_scope("highlight_line")
Custom Perso
build 4200
Settings
Package Control.sublime-settings
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Alignment",
"ApacheConf",
"ColorPicker",
"GitHub Theme",
"Json Colors And Navigation",
"JSON Reindent",
"Package Control",
"Pretty JSON",
"Sass",
"SqlBeautifier",
"SublimeLinter-php",
"Terminal",
"Twig",
],
}
Preferences.sublime-settings
{
"ignored_packages":
[
"Vintage",
],
"theme": "GitHub Dark.sublime-theme",
"color_scheme": "Monokai.sublime-color-scheme",
"index_files": true,
"font_size": 14,
}
Key Bindings
[
{ "keys": ["ctrl+shift+j"], "command": "pretty_json" },
{ "keys": ["ctrl+m"], "command": "sql_beautifier" },
{ "keys": ["super+t"], "command": "transpose" },
{ "keys": ["super+shift+t"], "command": "reopen_last_file", "args": {"source": "window"} },
{ "keys": ["ctrl+t"], "command": "open_terminal"},
{ "keys": ["ctrl+shift+t"], "command": "open_terminal_project_folder" },
{ "keys": ["ctrl+0"], "command": "reset_font_size" }
]