1whatleytay / saturn

A modern MIPS interpreter and assembler.
MIT License
29 stars 6 forks source link

Suggestions #6

Open AlekseyPanas opened 1 year ago

AlekseyPanas commented 1 year ago

Heya! Amazing work on Saturn! I'm really loving it so far. I was on the brink of losing my mind with MARs, but you have saved me! A few suggestions came up as I worked. I'll write them all here and leave it to you to organize them into individual issues as you see fit.

Zoom: On my mac, the code is a bit too large. I can only see a small chunk of it at a time and would love to zoom out. I imagine the text size varies with screen resolution and other factors, so an IDE setting to change font size would be great.

Minimap: While a separate feature entirely, it falls into the same reasoning. Assembly code tends to be more tall than wide so having a VScode style mini side display of your entire code file would be neat. When working with tall CSS files I like to use large ASCII text art in comments and navigate my file using the minimap

Remove Enter to Autocomplete: A minor issue I had was when I wrote something and wanted to skip to the next line, but because what I wrote generated suggestions, pressing enter would actually auto-fill the suggestion instead of skipping a line when I didn't actually want it to. I notice that TAB is an alternate key you have set for autocomplete. I suggest removing the ENTER key from this, or adding some customization in a settings menu for which key triggers the autocomplete

File Listening: Most modern IDEs listen for file changes in case the file is changed from another IDE. I had my file open in both Saturn and VScode for various reasons, and making an edit in VScode did not cause the change to reflect in Saturn. The next time I'd save in Saturn, it would obviously overwrite and revert those changes that I made in VScode. There is no way to refresh the file in Saturn without reopening it manually. VScode has some sort of background listener which checks for file changes so that if it is edited externally, VScode updates the file in the editor.

Includes: It would be a blessing to be able to work in multiple files. I know that position of code matters in assembly, but C-style includes could work. If you have a large chunk of code, you can extract it into a separate file and replace it with a one-line include. Building the main file will simply construct the complete code by parsing all the includes.

Collapsing Blocks: If a block of code is tabbed, display an arrow which allows you to hide/collapse that block of code for better visibility and navigation

1whatleytay commented 1 year ago

Hey! Thanks for bringing these things up! I think many of these features are due for 0.1.6. Options for font size, and autocomplete keys are features that I have been wanting to add for a while.

A Minimap and Collapsing Blocks for assembly are challenging features to implement, and might take longer to complete. I think I agree that assembly can be very difficult to navigate, but it might take some more time to rope these in. In the meantime, I'll try to provide an option for automatically watching files for other editors.

I'll split this issue tomorrow. Thanks for the feedback!

AlekseyPanas commented 1 year ago

The includes might not be necessary if you have collapsing blocks. Sublime actually simply detects tabs, so there is no code parsing. As long as there is a series of tabbed lines under line that is less tabbed (or not tabbed at all), you'll be able to collapse it.

MARs currently supports multiple files as this stackoverflow post shows. Apparently .globl has something to do with it, though you probably know better than I do! https://stackoverflow.com/questions/47004779/mips-how-to-run-multiple-files-in-mars

AlekseyPanas commented 1 year ago

Also I should add Word Wrap as another suggestion, though Im sure you already had it in mind

AlekseyPanas commented 1 year ago

Another Suggestion: customizing console docking side. Sometimes I'd like it on the right instead of the bottom

1whatleytay commented 1 year ago

I can do some of this, although word wrapping is hard for some of the same reasons as #9... If you're interested in this stuff I'm always open to pull requests if you want to add a feature you'd like to use for yourself. I'll still try to get at least half of these done for 0.1.6, it might just take a minute.

AlekseyPanas commented 1 year ago

Awesome, Ill definitely try to implement some of these!

AlekseyPanas commented 1 year ago

Just gonna keep adding suggestions here as I come up with them.

Splitting memory: Allowing the user to have two or more memory windows side by side at different locations to monitor changes (sort of like opening the same file twice in an IDE, to see one part of it in one window, and to edit another part on another)

1whatleytay commented 8 months ago

Some of these were addressed:

I'm going to split these out into project tasks soon, so I can resolve each individually. Thanks again for posting these!

cykadash commented 3 months ago

Will file listening work with git pull for example?

1whatleytay commented 3 months ago

It should, yep. The package I'm using for fs listening is notify, which should have good support for all platforms, too.