ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

PHP Comment Wrap

by bey0nd_g0dlike ALL Needs Review

Wrap your HTML code in PHP comments

Details

Installs

  • Total 6K
  • Win 4K
  • Mac 767
  • Linux 977
Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19
Windows 0 0 0 0 0 0 0 2 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
Mac 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
bitbucket.​org

Sublime PHP Comment Wrap

A snippet to wrap your HTML code in PHP comments. Very useful for WordPress developers when there's a lot of HTML code in PHP files.

Plugin function is limited to only wrapping the HTML and JS code inside PHP files.

Quickstart

  1. Install Via Package Control PHP Comment Wrap
  2. Select some text.
  3. Use the default key bindings 'ctrl+alt+c' to wrap the selection in php comments
  4. Enjoy!

Installation

via PackageControl

If you have PackageControl installed, you can use it to install the package.

Just type cmd-shift-p/ctrl-shift-p to bring up the command pallete and pick Package Control: Install Package from the dropdown, search and select the package there and you're all set.

Manually

You can clone the repo in your /Packages (Preferences -> Browse Packages…) folder and start using/hacking it.

cd ~/path/to/Packages
git clone https://bitbucket.org/bey0nd_g0dlike/phpcommentwrap PHPCommentWrap

Options

selection_start & selection_end: These options allow you to modify the kind of selection wrapping the plugin will insert.

{
    "keys": ["ctrl+alt+c"],
    "command": "wrap_html_in_php_comment",
    "args": {
        "selection_start": ""
    },
    "context":
    [
        {
            "key": "selector",
            "operator": "equal",
            "operand": "text.html"
        },
        {
            "key": "selector",
            "operator": "not_equal",
            "operand": "source.php"
        }
    ]
}

Issues

This is the first version, so feel free to comment or send requests at: http://bitbucket.org/bey0nd_g0dlike/sublime-text-php-comment-wrap/issues