Topic: Feature request: macros

would be nice to have macro abilities in the editor.

Re: Feature request: macros

Macros would be a nice, and substantial, addition to Simply Fortran.   Honestly, though, a feature like that would require substantial integration (most likely, I haven't looked at any pre-existing solutions).  Due to the scale, I would not foresee that feature hitting Simply Fortran until at least 3.0.

Does anyone else have any opinion on this?

Jeff Armstrong
Approximatrix, LLC

3 (edited by davidb 2014-11-26 13:57:47)

Re: Feature request: macros

Personally I don't need macros. If I need them occasionally I use Vim.

What would be a good addition, however, would be tags (integrating with Exuberant ctags) for variables and subprograms. I think Scintilla has some ctags support.

For this I currently use Vim and the taglist plugin which is built on ctags.

Perhaps have an option to use Vim as the built-in editor ! (only kidding).

--
David

Re: Feature request: macros

Well...I like trying different editors here and there, but if they do not have macros and rectangular selection, I pretty much stay away...been using NEdit for years, on the Windows side started with Crimson, but ended up with Notepad++; currently, I am looking into switching to Sublime-Text on both platforms...talk about a (way too) powerful editor.

Anyway, I was just saying.

Re: Feature request: macros

Macros would probably be a nice addition, but I would like to gauge the community's desire for them as they aren't a trivial feature. 

Out of curiosity, what would be an example of a macro you would use within Simply Fortran?  I don't tend to use them much myself (I use Simply Fortran for most development, so that isn't much of a surprise), and I'd like to hear some of your examples if you'd be willing to share.

Jeff Armstrong
Approximatrix, LLC

Re: Feature request: macros

I haven't thought before now about how it might be helpful to have macros available but, on reflection, there are a few things I do repeatedly, which it would be an advantage if were they readily automatable.

Example (1).

Just now, whilst testing a project, I am repeatedly doing this:

In Simply Fortran:
Edit some code in any one of many routines.
Build.
Run (if Debug worked, I'd use that!)
Then, inside my program:
  - Pull down a menu
  - Select 'Open file'
  - Always select the same data filename
  - Confirm, 'open'
  - Respond to a dialog that always follows, with 'NO'
  - Select another menu
  - Do some other stuff
  - Select a third menu
  - Click, 'Analyse'
  - After the program run, scroll the screen to examine the results.

I always do the same.

I suspect that the only part of this which it might be feasible to automate is the very start, the SF part.
I would not find that useful.


Example (2)
I have two projects, 'A' and 'B'.
Project 'A' uses object code from project 'B' (which is a static library.
I'm in project 'A' and I discover I need to edit one of the source files for project 'B'
So I open it and edit it.  But I'm still in project 'A'.

This part could be automated:
Starting in project 'A'
Project -> Recent projects -> project 'B' pathname -> Open.
Build.
Project -> Recent projects -> project 'A' pathname -> Open.
Clean.
Build.

I've opened a file in project 'B'


Example (3)
From a 64-bit project,
Switch a few things to a 32-bit project.
Build
Switch back.
---
J

Re: Feature request: macros

Oh, wow...that's is not exactly what I had in mind.

All I was talking about was about macros just at the Editor level, that's all.  Meaning, being able to click on the record button (or type a keyboard shortcut), start a sequence of editing actions, stop recording, play back macro.

John's idea of automation is at another level...at the top level where basically you could automate just about anything, like opening another project and continuing the macro there and then even come back.

I work on Linux mostly and don't even use an IDE, typically work with several editor windows opened at a time and several command line terminals, bash scripts and make files are my friends...edit, recompile and re-deploy libraries in a flahs, clean *.o files, re-compile and re-run main program in a flash.

That is something, though...is it possible to open more than one project in SimplyFortran? It does not seem to. I can open two instances of SimplyFortran, that's for sure. 

anyway...

8 (edited by JohnWasilewski 2014-11-27 23:45:36)

Re: Feature request: macros

I was giving some examples in reply to Jeff's question, although, in fact, macros, at any level, would not be high on my own wish list.  My preference would be to have SF include, in no particular order, these:

i) more than one project open at a time
    ( currently I either switch to and fro
      between projects or run two copies
      of Simply Fortran);

ii) switchable 'debug' and 'release' versions
    of a project;

iii) a single switch to toggle between the 32 and
     64 bit versions of the same project
     (currently I keep two projects in the same
       folder, with shared source files but separate
       object file sub-folders).
---
John.