😌Configuring Sublime Text (ok)
https://granneman.com/webdev/editors/sublime-text/configuring-sublime-text
Generic Config
User Settings ↩
These settings apply by default to every file you create in Sublime Text, but they can be over-ridden by syntax-specific settings (for HTML, Markdown, CSS, & so on).
Open Sublime Text.
Open the Sublime Text personal settings file:
Mac OS X: Sublime Text 2 > Preferences > Settings - User
Windows: Preferences > Settings - User
Linux: Preferences > Settings - User
A file named Preferences.sublime-settings
should open.
This file will not be empty, & should contain the following lines:
Overwrite the entire file with the following1:
Let me explain a few of those settings, as you may wish to change them on your computer.
"color_scheme": "Packages/Color Scheme - Default/Blackboard.tmTheme"
: This controls the colors you see by default. I like a dark theme, & you may not. To pick a different one, go to Preferences > Color Scheme & find one you like.
"font_face": "Consolas"
: I really like Microsoft's Consolas: it's a very readable, usable, thoughtful monospace font for coding. It should be on any recent Windows machine & any Mac that has Microsoft Office installed on it. If you don't have Consolas, I recommend the following instead:
Windows: Courier New (actually, if you're OK with downloading & installing fonts, I'd use Andale Mono instead)
Mac OS X: Menlo or Courier
Linux: DejaVu Sans Mono (if you don't have the DejaVu fonts, you can get them at DejaVu fonts)
"font_size": 16
: Change this to a larger or smaller number depending upon your eyesight.
Changing Preferences.sublime-settings
↩
Preferences.sublime-settings
↩What about other preferences? The easiest way to find the others is to open the default preferences file & copy the thing you want to change from there. Do not change the default preferences file!
Open the Sublime Text default settings file:
Mac OS X: Sublime Text 2 > Preferences > Settings - Default
Windows: Preferences > Settings - Default
Linux: Preferences > Settings - Default
A file named Preferences.sublime-settings
should open. Yes, it is named the same as your personal settings file, which is confusing. However, it should be very obvious which is which, as one is long & filled with entries, while the other should be short.
Read through the file. If you see any entry you'd like to change, copy it, including the comment describing what it does, paste it into your personal settings file, & change it there. Leave the original lines behind in the default settings file.
For instance, let's say you decide to hide the line numbers by default (I do not recommend this; it's just an example). Copy (copy, not cut!) these lines from the default settings file:
Now paste them into your personal settings file & change them (the comma at the end may be very important; read the next section to see why):
Save your personal settings file. Depending upon the setting, you may see a change immediately, or you may need to restart Sublime Text to see your change take hold.
Be careful changing your personal settings file ↩
Note that if you choose to add anything to your personal settings file, the following rules apply:
The last preference must not have a comma after it
All other preferences must have commas after them
Failure to adhere to these rules will result in your personal settings file not working!
HTML Preferences ↩
Create a blank file by pressing Command+N (Mac) or Ctrl+N (Windows or Linux) in Sublime Text.
Look in the bottom right of the window. You should see the words Plain Text
.
Click on Plain Text
& a long menu should appear listing a variety of different programming & markup languages. Select HTML
from this menu. The bottom right of the window should now say HTML
.
Open the Sublime Text settings file that governs the preferences for HTML coding:
Mac OS X: Sublime Text 2 > Preferences > Settings - More > Syntax Specific - User
Windows: Preferences > Settings - More > Syntax Specific - User
Linux: Preferences > Settings - More > Syntax Specific - User
A file named HTML.sublime-settings
should open.
This file should be empty. Put the following into HTML.sublime-settings
:
Do NOT click on the little menu on the bottom right that says
JSON
& change it! Settings files in Sublime Text are always inJSON
format!
Save HTML.sublime-settings
& close it.
CSS ↩
If you’re continuing from the previous section, use the same blank file that currently says HTML
in the bottom right. Click on the HTML
& choose CSS
from the menu.
If you are not continuing from the previous section, create a blank file by pressing Command+N (Mac) or Ctrl+N (Windows or Linux) in Sublime Text.
Look in the bottom right of the window. You should see the words Plain Text
.
Click on Plain Text
& a long menu should appear listing a variety of different programming & markup languages. Select CSS
from this menu. The bottom right of the window should now say CSS
.
Open the Sublime Text settings file that governs the preferences for CSS coding:
Mac OS X: Sublime Text 2 > Preferences > Settings - More > Syntax Specific - User
Windows: Preferences > Settings - More > Syntax Specific - User
Linux: Preferences > Settings - More > Syntax Specific - User
A file named CSS.sublime-settings
should open.
This file should be empty. Put the following into it:
Do NOT click on the little menu on the bottom right that says
JSON
& change it! Settings files in Sublime Text are always inJSON
format!
Save CSS.sublime-settings
& close it.
Markdown ↩
There are two kinds of Markdown syntax that Sublime Text supports: Markdown & MultiMarkdown. Fortunately, you can create preferences for both of them quickly & easily.
Markdown ↩
If you’re continuing from the previous section, use the same blank file that currently says CSS
in the bottom right. Click on the CSS
& choose Markdown
from the menu.
If you are not continuing from the previous section, create a blank file by pressing Command+N (Mac) or Ctrl+N (Windows or Linux) in Sublime Text.
Look in the bottom right of the window. You should see the words Plain Text
.
Click on Plain Text
& a long menu should appear listing a variety of different programming & markup languages. Select Markdown
from this menu. The bottom right of the window should now say Markdown
.
Open the Sublime Text settings file that governs the preferences for Markdown coding:
Mac OS X: Sublime Text 2 > Preferences > Settings - More > Syntax Specific - User
Windows: Preferences > Settings - More > Syntax Specific - User
Linux: Preferences > Settings - More > Syntax Specific - User
A file named Markdown.sublime-settings
should open.
This file should be empty. Put the following into it:
Markdown has no one set extension, hence the need to define possible extensions that Markdown could use. There are others, such as markdown
, that I never use. If you run across those, or decide to use them, add it here.
And even though the default setting for trim_trailing_white_space_on_save
is false
, it's a good idea to set it here. Sure, it's unnecessary, but if you did decide to change it in your default Sublime Text preferences & didn't have it here, it would be disastrous to Markdown files, which depend in some instances upon trailing white spaces2.
Do NOT click on the little menu on the bottom right that says
JSON
& change it! Settings files in Sublime Text are always inJSON
format!
Save Markdown.sublime-settings
& close it.
MultiMarkdown ↩
If you’re continuing from the previous section, use the same blank file that currently says Markdown
in the bottom right. Click on the Markdown
& choose Markdown > MultiMarkdown
from the menu.
If you are not continuing from the previous section, create a blank file by pressing Command+N (Mac) or Ctrl+N (Windows or Linux) in Sublime Text.
Look in the bottom right of the window. You should see the words Plain Text
.
Click on Plain Text
& a long menu should appear listing a variety of different programming & markup languages. Select Markdown > MultiMarkdown
from this menu. The bottom right of the window should now say Markdown > MultiMarkdown
.
Open the Sublime Text settings file that governs the preferences for MultiMarkdown coding:
Mac OS X: Sublime Text 2 > Preferences > Settings - More > Syntax Specific - User
Windows: Preferences > Settings - More > Syntax Specific - User
Linux: Preferences > Settings - More > Syntax Specific - User
A file named MultiMarkdown.sublime-settings
should open.
This file should be empty. Put the following into it:
Do NOT click on the little menu on the bottom right that says
JSON
& change it! Settings files in Sublime Text are always inJSON
format!
Save MultiMarkdown.sublime-settings
& close it.
Last updated