FilipVanVooren / stevie

Modern Programming Editor for the Texas Instruments TI-99/4a Home Computer
GNU General Public License v3.0
4 stars 0 forks source link

Smart filename selection on file load/insert #34

Closed MirrorPusher closed 2 years ago

MirrorPusher commented 2 years ago

When calling the "Open file" dialog or the "Insert file at line" dialog, a routine is to be triggered that evaluates the current frame buffer line and looks for a valid device/file name. If it finds a valid device and filename, it should be preset as the file to load/insert.

Further details: https://atariage.com/forums/topic/307708-what-dsr-filedevice-names-are-used-for-io/?do=findComment&comment=4961687

What I like to do in Stevie (the editor I’m working on), is to offer a possibility to open a file just by putting the cursor on a line in the editor and let the editor decide if it’s a potential device/file combination. If it is, you will get the option to load the file into the editor. So a predefined list of strings to match against would be my preferred way to go. Having said that, I can make this list configurable by the user. Thay way as new devices appear they can simply be added to the list.

Suppose the editor has following lines: COPY “DSK1.ABC;S” TIPI.STEVIE.SRC.ABC;S

If I put the cursor on the 1st line at position “DSK1” or on the 2nd line at the beginning of the line, then the editor should offer me the possibility to read the file into the editor.

Supported storage devices: def.devices #string ',DSK,HDX,IDE,PI.,PIO,TIPI.,RD,SCS,SDD,WDS,RS232'

MirrorPusher commented 2 years ago

Implemented in Stevie 1.2J