Coder Social home page Coder Social logo

phpstorm-url-handler's Introduction

PhpStorm URL Handler

This package contains a launcher to open files in PhpStorm at the defined line number and an associated desktop file that conforms to the Desktop Entry Specification for use in Gnome and KDE desktop environments.

Installation

The executable phpstorm or pstorm must be in your $PATH. If it is not, either add the install location to your path

export PATH="/path/to/phpstorm/bin/phpstorm.sh:$PATH"

or symlink it to one of /usr/bin or /usr/local/bin - which already should be in your $PATH. Use sudo if needed

ln -s /path/to/phpstorm/bin/phpstorm.sh /usr/bin/phpstorm

Then copy the actual handler to your $PATH and make it executable. Use sudo if needed

cp phpstorm-url-handler /usr/bin/phpstorm-url-handler
chmod +x /usr/bin/phpstorm-url-handler

Install the .desktop file to register the mime-types. Use sudo if needed

desktop-file-install phpstorm-url-handler.desktop
update-desktop-database

Usage

It can be used to open files at the specified line from within the browser by placing a link of the following kind in the markup:

<?php
$file = "/path/to/filename.php";
$line = 35;
print "<a href='phpstorm://open?url=file://$file&line=$line'>Open with PhpStorm</a>";
// Alternate Syntax to match PhpStorm 8 for the Macintosh
print "<a href='phpstorm://open?file=$file&line=$line'>Open with PhpStorm</a>";
?>

Command-line usage

FILE="/path/to/filename.php"
LINE=35
./phpstorm-url-handler "phpstorm://open?url=file://${FILE}&line=${LINE}"

This alternative syntax matches the format used by PhpStorm 8 for the Macintosh for cross-platform compatibility.

FILE="/path/to/filename.php"
LINE=35
./phpstorm-url-handler "phpstorm://open?file=${FILE}&line=${LINE}"

This script is used in the ARCH linux package to be found at
phpstorm-url-handler https://aur.archlinux.org/packages/phpstorm-url-handler/

License

GNU GENERAL PUBLIC LICENSE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.