Sublime3 configurations (user settings) and recommended addons for drupal development.
- Simplicity of usage
- Fast and light
- Supports multiple platforms (Mac, Linux, Windows)
- Plugin mechanism
- Great user adoption
Goto to Preferences > Settings - user and replace contents from Preferences.sublime-settings
Package Manager provides a mechanism for installing and managing sublime packages (addons) from the sublime package repository.
Use installation steps provided on Package Control installation page
Install PHP_Codesniffer and drupalcs
- Install PHP Code Sniffer
pear install PHP_CodeSniffer
- Download coder module from https://www.drupal.org/project/coder - use 8.x branch since 7.x seems broken (8.x branch can be also used for validating D7 code) and copy or link the coder/coder_sniffer/Drupal folder to to your PHP CodeSniffer Standards folder (e.g. /usr/share/php/PHP/CodeSniffer/Standards)
- Configure sublimelinter prefs by updating Preferences/Package Settings/Sublime Linter/Settings - User
"paths": {"linux": ["/usr/bin/php"]}, "syntax_map": {"php": "php"}, "sublimelinter_popup_errors_on_save": true, "sublimelinter_fill_outlines": true, "sublimelinter_gutter_marks": true,
- Create a new Build System in Tools/Build System/New Build System... with the following code:
and save the file on your User Package folder with the name Drupal.sublime-build{ "cmd": ["phpcs", "--report=emacs", "--standard=Drupal","--extensions=php,module,inc,install,test,profile,theme", "$file"], "file_regex": "^(.*):(.*):(.*):(.*)$" }
other plugins:
- SublimeCodeIntel