Changeset View
Changeset View
Standalone View
Standalone View
src/console/PhutilInteractiveEditor.php
<?php | <?php | ||||
/** | /** | ||||
* Edit a document interactively, by launching $EDITOR (like vi or nano). | * Edit a document interactively, by launching $EDITOR (like vi or nano). | ||||
* | * | ||||
* $result = id(new InteractiveEditor($document)) | * $result = (new InteractiveEditor($document)) | ||||
* ->setName('shopping_list') | * ->setName('shopping_list') | ||||
* ->setLineOffset(15) | * ->setLineOffset(15) | ||||
* ->editInteractively(); | * ->editInteractively(); | ||||
* | * | ||||
* This will launch the user's $EDITOR to edit the specified '$document', and | * This will launch the user's $EDITOR to edit the specified '$document', and | ||||
* return their changes into '$result'. | * return their changes into '$result'. | ||||
* | * | ||||
* @task create Creating a New Editor | * @task create Creating a New Editor | ||||
▲ Show 20 Lines • Show All 335 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0