#14 Allow for selecting an editor

open
nobody
5
2012-10-25
2012-10-25
Dennis Sutch
No

The WampServer tray menu uses Notepad to open files. Adding a configuration parameter to allow for setting a custom editor would be useful.

Discussion

  • Dennis Sutch
    Dennis Sutch
    2012-10-28

    Patch to allow choosing of editor in wampmanager.conf

     
    Attachments
  • Dennis Sutch
    Dennis Sutch
    2012-10-28

    Patch file can be used to implement this feature in an installed instance of WampServer. If given access to source code, I can also create patch file for source. Steps for providing functionality:

    1. Edit scripts\config.inc.php to include the following line after the line which begins with "$c_navigator":

    $c_editor = $wampConf['editor'];

    2. Edit wampmanager.tpl to replace all seven instances of

    "notepad.exe"

    with

    "${c_editor}"

    (maintain the quotes in the file).

    3. Edit scripts\refresh.php to replace all two instances of

    "notepad.exe"

    with

    "' . $c_editor . '"

    (maintain the quotes in the file).

    4. Finally, edit wampmanager.conf to add a line identifying your preferred editor’s path to the end of the "[main]" section. Verify the location of your preferred editor to ensure that WampServer's Aestan Tray Menu does not display error messages when attempting to edit files from the tray menu. Sample line to use Sublime Text 2 editor:

    editor = "C:\Program Files\Sublime Text 2\sublime_text.exe"

     
  • Faraz Yashar
    Faraz Yashar
    2012-12-19

    I was about to submit an identical patch. :)

     
  • Faraz Yashar
    Faraz Yashar
    2012-12-19

    There is one side effect however. WampServer and all other processes it launches run with administrative privileges. For some apps, Windows will not launch another instance which runs with standard privileges, preventing you from opening a file to edit directly from the file explorer.

    Say Sublime Text isn't running. From WampServer, launch httpd.conf for editing. Then try to open some other file from the file explorer. Nothing will happen. The ability to drag and drop a file into the editor will be disabled too.

    This doesn't seem to be an issue with Notepad, however, and may not be for other editors.