Setting up Sublime Text

1. Package Control

This is Sublime Text package manager for install or remove package. https://packagecontrol.io/installation
Use this guide to know how to install below package. https://packagecontrol.io/docs/usage

2. PackageResourceViewer

View or edit package resources.
https://packagecontrol.io/packages/PackageResourceViewer

3. Theme - soda

Custom UI themes for Sublime Text.
https://packagecontrol.io/packages/Theme - Soda

Config:
"theme": "Soda Dark 3.sublime-theme"
Restart sublime text to take effect.

4. Color scheme - Spacegray

Custom color scheme for Sublime Text.
https://packagecontrol.io/packages/Theme - Spacegray

Config:
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme"

Change highlight color for string

Press Ctr + Shift + p and type prv, find PackageResouceViewer: Open Resouce and hit enter
Type spacegray, find Theme-Spacegray and hit enter
Next we find base16-eighties.dark.tmTheme and open it
Find to these line:
<dict>
    <key>name</key>
    <string>Strings, Inherited Class</string>
    <key>scope</key>
    <string>string, constant.other.symbol, entity.other.inherited-class</string>
    <key>settings</key>
    <dict>
        <key>foreground</key>
        <string>#99cc99</string>
    </dict>
</dict>

and replace #99cc99 with #ffebb5, save and close file.

5. Install font Source Code Pro

Font for view code.
https://github.com/adobe-fonts/source-code-pro#download-the-fonts-otf-ttf-woff-eot

Config:
"font_face": "Source Code Pro"
"font_size": 13

6. Sublime​Linter

Highlight syntax error.
https://packagecontrol.io/packages/SublimeLinter
We must install Sublime​Linter first. Next install package for each language ex: Sublime​Linter-php, Sublime​Linter-ruby ...

7. Trailing​Spaces

Highlight trailing spaces and delete them.
https://packagecontrol.io/packages/TrailingSpaces

Config:
"trailing_spaces_trim_on_save": true,

8. Git​Gutter

See git diff in gutter.
https://packagecontrol.io/packages/GitGutter
This will work after next commit.

9. HTML-CSS-JS Prettify

HTML, CSS, JavaScript and JSON code formatter.
https://packagecontrol.io/packages/HTML-CSS-JS Prettify
Install node.js before this package.

10. Word​Highlight

Highlight all copies of the currently selected word.
https://packagecontrol.io/packages/WordHighlight

Config:
Open theme file like in step 4 and add these line inside <array> tag.(note that if SublimeLinter is installed then theme file will be copy to User package and be set as default color scheme. We can find and edit that file in Preferences/Color Scheme/User/SublimeLinter)
<dict>
    <key>name</key>
    <string>WordHighlight</string>
    <key>scope</key>
    <string>wordhighlight</string>
    <key>settings</key>
    <dict>
        <key>foreground</key>
        <string>#FFE792</string>
    </dict>
</dict>
and config in user setting file:
"color_scope_name" : "wordhighlight",
"draw_outlined": false,

11. Phpcs

Install this package for use PHP Code Fixer.
https://packagecontrol.io/packages/Phpcs

Config:
Install php-cs-fixer
Run this to fix permision:
sudo chmod a+x /usr/local/bin/php-cs-fixer
This config must in phpcs settings file (not user settings):
"php_cs_fixer_on_save": true,
"php_cs_fixer_executable_path": "/usr/local/bin/php-cs-fixer",
if want to change fix level
"php_cs_fixer_additional_args": {
    "--level": "psr2",
},
support levels is psr0, psr1, psr2, symfony.

Next, disable phpcs to prevent error on runtime becasue it enabled by default:
"phpcs_sniffer_run": false

12. Alignment

Alignment of multiple selections.
https://packagecontrol.io/packages/Alignment

Config keymap:
{ "keys": ["super+ctrl+a"], "command": "alignment" }

13. Other package

  • All autocomplete
  • BeautifyRuby
  • DocBlockr
  • jQuery
  • Sublime​Code​Intel
  • Tag
  • HTML5
  • EncodingHelper
  • SCSS

14. Highlight current line

Add this to user setting file.
"highlight_line": true

15. Ruler

Show right margin line at 120th character.
"rulers": [120],

16. Line height

"line_padding_bottom": 2,
"line_padding_top": 2,