Change tab switch feature, from smart predict way to Next Previous way
Add this to your user's key Binding file:
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" }
From https://www.sublimetext.com/forum/viewtopic.php?f=3&t=777
Working remotly:
http://wbond.net/sublime_packages/sftp/usage
How to install Sublime Linter
https://www.youtube.com/watch?v=u6fvJRao-E4
How to install PHP Code Sniffer
On terminal:
sudo apt-get install php-codesniffer
Then, run "which phpcs" to get the path to the phpcs installation
On sublime:
Open command palette (ctrl+shift+p) and install phpcs.
Then, go to: Preferences > Package Settings > PHP Code Sniffer > Settings - User
And add the path to the phpcs installation. My configuration was the following:
{
"phpcs_php_path": "/usr/bin/phpcs"
}
Install the DocBlockr
via Package Control
More info on https://packagecontrol.io/packages/DocBlockr
PHP Code formatting:
via Package Control
Install CodeFormatter, PHPfmt.
On the default phpfmt settings (Preferences -> Package Settings -> phpfmt -> Settings - Default), configure:
{
"format_on_save": false
}
On the default CodeFormatter settings (Preferences -> Package Settings -> CodeFormatter -> Settings - Default), configure php options:
"codeformatter_php_options":
{
"syntaxes": "php", // Syntax names which must process PHP formatter
"php_path": "/usr/bin/php7.0", // Path for PHP executable, e.g. "/usr/lib/php" or "C:/Program Files/PHP/php.exe". If empty, uses command "php" from system environments
"format_on_save": true, // Format on save
"php55_compat": false, // PHP 5.5 compatible mode
"psr1": false, // Activate PSR1 style
"psr1_naming": false, // Activate PSR1 style - Section 3 and 4.3 - Class and method names case
"psr2": false, // Activate PSR2 style
"indent_with_space": 4, // Use spaces instead of tabs for indentation
"enable_auto_align": true, // Enable auto align of = and =>
"visibility_order": false, // Fixes visibility order for method in classes - PSR-2 4.2
"smart_linebreak_after_curly": false, // Convert multistatement blocks into multiline blocks
// Enable specific transformations. Example: ["ConvertOpenTagWithEcho", "PrettyPrintDocBlocks"]
// You can list all available transformations from command palette: CodeFormatter: Show PHP Transformations
"passes": [
"AlignDoubleArrow",
"AlignDoubleSlashComments",
"AlignEquals",
"AlignGroupDoubleArrow",
"AlignTypehint",
"AllmanStyleBraces",
"OrderAndRemoveUseClauses"
],
// Disable specific transformations
"exclude": []
},
If you need to update from php 5.5 to 7.0:
To update your php to 7.0, follow this tutorial: here
Sublime Multi Selection commands:
Undo last selection
ctrl+u
Skip this selection and select next:
ctrl+k, ctrl+d
From: http://stackoverflow.com/questions/12411850/sublimetext-unselect-last-incrementally-selected-element
Other useful hotkeys (to be added at Preferences > Key Bindings - User):
Fence Logger:
{ "keys": ["ctrl+shift+l"], "command": "insert_snippet", "args": {"contents": "\\Fence\\Logger::info();"}}
From: http://stackoverflow.com/questions/15582210/sublime-text-how-to-make-shortcut-for-inserting-text
Alignment:
Install Alignment through Package Manager,
On the settings user (Preferences > Package Settings > Alignment > Settings - User), edit it as following:
{
"alignment_chars": ["=", "=>", ":"],
"alignment_space_chars": ["=", "=>", ":"]
}
Done. Ctrl+alt+a to align!
No comments:
Post a Comment