All Projects → erichard → Sublimephpcompanion

erichard / Sublimephpcompanion

Licence: mit
A Sublime Text 3 plugin that provides cool stuff for PHP 5.3+ coding session.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sublimephpcompanion

sublime-patcher
Bash script for patching/cracking Sublime Text on Linux
Stars: ✭ 20 (-97.79%)
Mutual labels:  sublime-text-3
Coffeescript Sublime Plugin
Syntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
Stars: ✭ 296 (-67.29%)
Mutual labels:  sublime-text-3
Easyclangcomplete
💥 Robust C/C++ code completion for Sublime Text 3
Stars: ✭ 537 (-40.66%)
Mutual labels:  sublime-text-3
pymolsnips
Pymolsnips is a library of PyMOL scripting language code fragments for several popular text editors.
Stars: ✭ 19 (-97.9%)
Mutual labels:  sublime-text-3
CMakeBuilder
Configure, build and test a CMake project right from within Sublime Text 3.
Stars: ✭ 27 (-97.02%)
Mutual labels:  sublime-text-3
Javascript Completions
JavaScript Completions for sublime text. It helps you to write your scripts more quickly with hints and completions.
Stars: ✭ 341 (-62.32%)
Mutual labels:  sublime-text-3
Sublundo
A Sublime Text 3 package implementing Vim-like branching undo/redo.
Stars: ✭ 16 (-98.23%)
Mutual labels:  sublime-text-3
Public
Repository for wallaby.js questions and issues
Stars: ✭ 662 (-26.85%)
Mutual labels:  sublime-text-3
Markdowntoc
SublimeText3 plugin which generate a table of contents (TOC) in a markdown document.
Stars: ✭ 278 (-69.28%)
Mutual labels:  sublime-text-3
Sublime zk
A SublimeText3 package featuring ID based wiki style links, and #tags, intended for zettelkasten method users. Loaded with tons of features like inline image display, sophisticated tag search, note transclusion features, support for note templates, bibliography support, support for multiple panes, etc. to make working in your Zettelkasten a joy 😄.
Stars: ✭ 408 (-54.92%)
Mutual labels:  sublime-text-3
CodeChampion
Plays epic sound clips when you write epic code on sublime Text!
Stars: ✭ 30 (-96.69%)
Mutual labels:  sublime-text-3
ToggleWords
Sublime Text 3 Plugin - Toggle words on hotkey
Stars: ✭ 36 (-96.02%)
Mutual labels:  sublime-text-3
Chromerepl
A Sublime Text plugin to execute JavaScript in Google Chrome
Stars: ✭ 347 (-61.66%)
Mutual labels:  sublime-text-3
CSSFontFamily
CSSFontFamily is a Sublime Text plugin with a collection of font stacks autocomplete.
Stars: ✭ 15 (-98.34%)
Mutual labels:  sublime-text-3
Javascriptenhancements
JavaScript Enhancements is a plugin for Sublime Text 3. It offers not only a smart javascript autocomplete but also a lot of features about creating, developing and managing javascript projects (real-time errors, code refactoring, etc.).
Stars: ✭ 592 (-34.59%)
Mutual labels:  sublime-text-3
Nineties
💾 Colors for World Wide Web pioneers
Stars: ✭ 16 (-98.23%)
Mutual labels:  sublime-text-3
Solarized
Solarized color scheme for Sublime Text 3
Stars: ✭ 314 (-65.3%)
Mutual labels:  sublime-text-3
Seti st3
Seti_UI Port for ST3.
Stars: ✭ 773 (-14.59%)
Mutual labels:  sublime-text-3
Dotfiles
i3 + Plasma: using the i3 window manager on the top of KDE Plasma and other dotfiles, configurations, scripts, workarounds and practises from my Debian Sid machines.
Stars: ✭ 651 (-28.07%)
Mutual labels:  sublime-text-3
Ayu
🎨🖌 Modern Sublime Text theme
Stars: ✭ 3,933 (+334.59%)
Mutual labels:  sublime-text-3

Sublime PHP Companion

This Sublime Text 3 Package provides cool stuff for PHP 5.3+ coding session.

Note I am looking for a maintainer for this project because I have switched to vim.

Installation

Package control

Just search for PHP Companion in package control and you're ready.

Keybinding

The package no longer provides keybindings. You will have to install your own shortcuts. The Default.sublime-keymap-sample will give you the shortcuts I personally use.

Commands

find_use

Just place your cursor on a class name, hit the F5 key (personal shortcut) and that's it.

It will show you the different namespace that match your class, pick up one and you're done.

PHP Companion will sort your uses statement in alphabetical order. This can be configured to sort by line length with the use_sort_length user setting.

expand_fqcn

This command expands the class under the cursor to its FQCN (Fully Qualified Class Name). You have two keys for this command F6 and shift+F6 (personal shortcut) that respectively expand with and without the leading namespace separator \.

import_namespace

Just hit the F4 key (personal shortcut), it will add the namespace definition based on the absolute filename of the current file. I use a simple trick to determine where the namespace begun, actually the namespace will start at the first CamelCased folder.

If a namespace is already declared, the command will shout how crazy you are in the status bar.

Warning: This feature requires a filename so the command won't work in an unsaved buffer.

goto_definition_scope

Hit shift+F12 (personal shortcut) to search for a method definition based on the current scope. It will fallback to the "goto_definition" command if a match was not found.

insert_php_constructor_property

Hit F7 (personal shortcut) to insert both a constructor argument and its according property. The property will be private by default but you can change it with the visibility setting.

implement

Place your cursor on a class, abstract class or an interface name and hit the F3 key (personal shortcut). Matching interfaces or classes will be shown. Select one and then import all or one of the methods from that interface or class.

See use_todo_implement setting.

Settings

Settings can be stored either in your system wide "PHP Companion.sublime-settings" file or in the project settings file. This allows you to set preferences per-project if you need to.

If you're storing settings in a project file, put them in a phpcompanion node like this:

"phpcompanion": {
    "exclude_dir": [
        "vendor",
        "build"
    ]
}

exclude_dir

List of directories to exclude when searching for the class declaration file. Path is relative to the project directory.

Please note that the filtering is done after the search in the index. So this option has no impact on performance, it's just a convenient way to avoid duplicate namespace declaration in some case.

use_sort_length

When importing use statements with the find_use command, sort statements by the length of the line.

use_todo_implement

When an interface or abstract class is implemented, this option is used to customize the method body of the newly added methods.

The available options are true and false.

"use_todo_implement": true:

public function methodName()
{
    // TODO: Implement 'methodName' method.
}

"use_todo_implement": false:

public function methodName()
{
    throw new \Exception("Method 'methodname' not implemented");
}

Successor of SublimeCTagsPHP

This plugin is the successor of SublimeCTagsPHP. PHP Companion uses the built-in index of Sublime Text 3 instead of CTags.

Warning! PHP Companion does not work on Sublime Text 2 and never will.

Licence

All of Sublime PHP Companion is licensed under the MIT license.

Copyright (c) 2013-2020 Erwan Richard

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].