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

PHP Comment Wrap

Wrap your HTML code in PHP comments

Details

Installs

  • Total 6K
  • Win 4K
  • Mac 753
  • Linux 963
May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26
Windows 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0
Mac 0 0 0 1 1 0 0 0 0 0 1 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 0 0 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 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