Dyalog / ride

Cross-platform IDE for Dyalog APL
https://dyalog.github.io/ride
MIT License
205 stars 31 forks source link

Edit .dyalog text files from IDE #419

Closed fourier closed 6 years ago

fourier commented 6 years ago

Describe the issue you are having

Currently it seems not possible to edit text file with extenison .dyalog containing Dyalog APL source code from the IDE. File->Open allows to open only workspaces

Did you connect to an already running interpreter or start the interpreter from RIDE?

Start interpreter

How do you reproduce the issue?

Try to open any something.dyalog file via File->Open menu

Paste the contents of Help → About (Shift+F1)

IDE:
  Version: 4.1.3151
  Platform: Linux x86_64
  Date: 2018-04-20 17:00:22 +0200
  Git commit: 98cdb1278456012d2cc257831a253b58901a1a1a
  Preferences:{
    "blinkCursor":"0",
    "blockCursor":"1",
    "colourScheme":"Francisco Goya",
    "cursorBlinking":"solid",
    "kbdLocale":"en_US",
    "keys":"{\"BK\":[\"Ctrl-Up\"],\"FD\":[\"Ctrl-Down\"],\"LBR\":[\"F10\"],\"PF10\":[],\"TL\":[]}",
    "otherExe":"/opt/mdyalog/16.0/64/unicode/mapl",
    "selectionHighlight":"1",
    "squiggleTips":"1",
    "zoom":"5"
  }

Interpreter:
  Version: 16.0.32456
  Platform: Linux-64
  Edition: Unicode/64
  Date: Mar 13 2018 at 03:31:46
e9gille commented 6 years ago

The File->Open command is currently letting the user browse for a file and then prefixes the path with )load or )xload. I think there was talk about doing more than that, but that's where we are today.

I could certainly extend the menu with options to let you open any file and the question then becomes what you would expect to happen. Options I can think of:

  1. )ED file://path would open any text file for editing but content is not saved in workspace (unless you make a change and then fix at which point it will prompt).

  2. 2 ⎕FIX 'file://path' would attempt to fix the content fo the file specified.

  3. ]SALT.Load path as with 2 above but using the user command.

fourier commented 6 years ago

I mean we have an option in "Open" dialog to select a file type already (see screenshot), with Workspaces as the only option. Why not to add *.dyalog here and edit them as a normal files? Then in editor there could be an option to FIX current file.

window_2018-05-27-20-16-01

e9gille commented 6 years ago

Sure, if we go with option 1 we can use the same menu item. Of course, I would then remove the restriction on extension completely as you may want to edit a text file with a different extension.