Sublime Text est un éditeur de texte et sa principale force est la personnalisation et ses Packages.
Voir Configuration de projet.
Name | OSX | Windows |
---|---|---|
Go to anything | ⌘+P | Ctrl+P |
Command Palette | ⌘+⇧ Shift+P | Ctrl+⇧ Shift+P |
Name | OSX | Windows |
---|---|---|
Single window | Alt + Shift + 1 | Option + Command + 1 |
Two to four columns | Alt + Shift + [2/3/4] | Command + Option + [2/3/4] |
Two rows | Alt+Shift+8 | Command + Option + 8 |
Three rows | Alt+Shift+9 | Command + Option + 9 |
Grid, Two columns, Two rows | Alt+Shift+5 | Command + Option + 5 |
Move current file to group # | Ctrl + Shift + [1/3/4] | Control + Shift + [1/3/4] |
Focus group # | Ctrl + [1/2/3/4] | Control + [1/3/4] |
Windows | %APPDATA%\Sublime Text 3 |
---|---|
Mac | ~/Library/Application Support/Sublime Text 3 |
Linux | ~/.config/sublime-text-3 |
Option | Description | Valeurs possibles |
---|---|---|
font_face | ||
font_size | ||
font_options | Options possibles: directwrite , gray_antialias | |
scroll_past_end | true , false |
|
highlight_line | true , false |
|
fade_fold_buttons | true , false |
|
bold_folder_labels | true , false |
|
highlight_modified_tabs | true , false |
|
preview_on_click | Preview file contents when clicking on a file in the side bar. Double clicking or editing the preview will open the file and assign it a tab. | true , false |
caret_extra_bottom | ||
caret_extra_top | ||
caret_extra_width | ||
caret_style | smooth , phase , blink , wide and solid . |
|
word_wrap | auto , true , false . |
|
update_check | true , false . |
Dans Package Control, taper soda
et installer Theme - Soda. Dans les préférences (user), entrer "theme": "Soda Dark.sublime-theme"
.
"theme": "Glacier.sublime-theme"
"color_scheme": "Packages/User/glacier (SL).tmTheme"
lineHighlight
de #282833
Le color scheme s'installe en même temps que le thème.
Dans le Package Control, taper Phix
et installer. Ensuite, dans les préférences, choisir Color Scheme → Phix Color Scheme → Phix Dark.
Pour ajouter un raccourci afin d'éditer un fichier via le Terminal, il suffit de créer un lien:
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
Pour accéder à la configuration spécifique à un langage, ouvrir un fichier d'un certain type, exemple PHP, et faire Preferences → Settings - More → Syntax Specific - User. Le fichier qui s'ouvre devrait être {NomDeLaSyntaxe}.sublime-settings
, dans notre cas ce serait PHP.sublime-settings
.
Ce fut un bug, depuis supposément corrigé, mais qui peut encore poser problème… Pour régler ce problème, on peut ajouter dans les Preferences → Key Bindings - User les key bindings suivants :
{ "keys": ["control+keypad_divide"], "command": "toggle_comment", "args": {"block": false}}, { "keys": ["shift+control+keypad_divide"],"command": "toggle_comment", "args": {"block": true}}
{ "caret_extra_bottom": 1, "caret_extra_top": 1, "caret_extra_width": 1, "caret_style": "smooth", "color_scheme": "Packages/Theme - Brogrammer/brogrammer.tmTheme", "detect_indentation": false, "font_face": "Droid Sans Mono", "font_size": 10, "font_options": ["gray_antialias"], "highlight_line": true, "ignored_packages": [ "Vintage", "SublimeLinter-jscs", "Markdown" ], "margin": 0, "rulers": [ 80 ], "scroll_past_end": true, "always_show_minimap_viewport": true, "tab_size": 4, "theme": "Brogrammer.sublime-theme", "translate_tabs_to_spaces": true, "word_separators": "./\\()\"'-:,.;<>~!@#$%^&*|+=[]{}`~?", "word_wrap": false }
Sublime Text est disponible en version portable. Pour ajouter un item dans le menu contextuel de Windows Explorer, on pour utiliser le fichier suivant qui ajoutera des clés dans la base de registre de Windows.
Attention de changer les chemins au .EXE
de Sublime Text.
Windows Registry Editor Version 5.00 ; This will make it appear when you right click ON a folder ; The "Icon" line can be removed if you don't want the icon to appear [HKEY_CLASSES_ROOT\Directory\shell\sublime] @="Open Folder as Sublime Project" "Icon"="\"C:\\Users\\user\\Desktop\\Tools\\Sublime Text 3\\sublime_text.exe\",0" [HKEY_CLASSES_ROOT\Directory\shell\sublime\command] @="\"C:\\Users\\user\\Desktop\\Tools\\Sublime Text 3\\sublime_text.exe\" \"%1\"" ; This will make it appear when you right click INSIDE a folder ; The "Icon" line can be removed if you don't want the icon to appear [HKEY_CLASSES_ROOT\Directory\Background\shell\sublime] @="Open Folder as Sublime Project" "Icon"="\"C:\\Users\\user\\Desktop\\Tools\\Sublime Text 3\\sublime_text.exe\",0" [HKEY_CLASSES_ROOT\Directory\Background\shell\sublime\command] @="\"C:\\Users\\user\\Desktop\\Tools\\Sublime Text 3\\sublime_text.exe\" \"%V\"" ; Notepadd++ like open with sublimeText2 [HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3] @="Open with Sublime Text 2" "Icon"="\"C:\\Users\\user\\Desktop\\Tools\\Sublime Text 3\\sublime_text.exe\",0" [HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command] @="\"C:\\Users\\user\\Desktop\\Tools\\Sublime Text 3\\sublime_text.exe\" \"%1\""
[ { "keys": ["ctrl+shift+r"], "command": "browser_refresh", "args": { "auto_save": true, "delay": 0.5, "activate_browser": true, "browser_name" : "all" } }, { "keys": ["control+keypad_divide"], "command": "toggle_comment", "args": {"block": false}}, { "keys": ["shift+control+keypad_divide"],"command": "toggle_comment", "args": {"block": true}}, { "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} }, { "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} }, { "keys": ["ctrl+alt+up"], "command": "swap_line_up" }, { "keys": ["ctrl+alt+down"], "command": "swap_line_down" }, ]