« Sublime text » : différence entre les versions
Aucun résumé des modifications |
|||
| (21 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 | 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 | 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 == | == Commandes == | ||
* | * | ||
| Ligne 46 : | Ligne 74 : | ||
</pre> | </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 | ||
[[category:softz]] | |||
---- | |||
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> | |||
== 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]] | |||