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!
Tuesday, March 17, 2015
Friday, March 13, 2015
Ubuntu 14.04 LTS USB not working (autosuspending)
To correct this, execute the following commands on terminal:
sudo su
sudo su
for foo in /sys/bus/usb/devices/*/power/level;
do echo on > $foo;
done
Extracted from http://askubuntu.com/questions/80638/how-to-disable-auto-power-off-of-usb-devices-like-usb-mouse
Wednesday, March 11, 2015
Solve Ubuntu 14.04 LTS network suspending problem
To solve this problem, create a script file as bellow:
sudo gedit
With the following content:
sudo chmod +777
It's done!
Tutorial extracted from http://askubuntu.com/questions/452826/wireless-networking-not-working-after-resume-in-ubuntu-14-04
sudo gedit
etc/pm/sleep.d/script.sh
With the following content:
#!/bin/sh
case "${1}" in
resume|thaw)
nmcli nm sleep false
;;
esac
Now make it executable:sudo chmod +777
etc/pm/sleep.d/script.sh
It's done!
Tutorial extracted from http://askubuntu.com/questions/452826/wireless-networking-not-working-after-resume-in-ubuntu-14-04
How to create a Wifi network with Ubuntu 14.04
First of all, install the app-hotspot (before start it, read this entire LucasTipss tutorial):
http://www.edivaldobrito.com.br/como-criar-hotspot-wi-fi-portatil-para-celulares-android-windows-no-ubuntu/
Now, there's a bug with ubuntu 14.04 LTS. To fix it, follow the bellow steps. The solution is a downgrade of the system. (extracted from http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html)
http://www.edivaldobrito.com.br/como-criar-hotspot-wi-fi-portatil-para-celulares-android-windows-no-ubuntu/
Now, there's a bug with ubuntu 14.04 LTS. To fix it, follow the bellow steps. The solution is a downgrade of the system. (extracted from http://www.webupd8.org/2013/06/how-to-set-up-wireless-hotspot-access.html)
Fot 64-bit:
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_amd64.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd
For 32-bit:
cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/universe/w/wpa/hostapd_1.0-3ubuntu2.1_i386.deb
sudo dpkg -i hostapd*.deb
sudo apt-mark hold hostapd
Subscribe to:
Posts (Atom)