editor issue

Home Forums SwiftForth Forum editor issue

This topic contains 2 replies, has 2 voices, and was last updated by  Alaa Alawi 9 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #12375

    Alaa Alawi
    Participant

    Hi ,

    I’m trying to run ‘edit xxx’ from SwiftForth 3.7.1 but I get back ‘ok’ without any .SwiftForth-editor opening.

    The same ‘edit xxx’ works in the evaluation version 3.6.5 !

    I tried ‘strace’ing both but no apparent differences in the system calls issued neither any errors.

    I’m wondering why the evaluation is working while the other does not work!?

    I really miss the interactivity and tight dev cycle this word provide.

    I’m running Linux Mint 15, 64bit.
    .SwiftForth-editor is a soft link to /usr/bin/vim

    Is there anything to be done for the 3.7.1 version? Am I missing something?

    Regards

    Ala’a

    #12408

    Roelf
    Participant

    Can’t help you with your Linux setup, but tried in macOS with SF 3.7.1:

    In home folder
    ln -s /usr/bin/vim .SwiftForth-editor
    then launch sf and
    edit dup
    will launch vim with core.f, but cursor is at the top of the file and not at ‘dup’.

    Saving the following script as a textfile .SwiftForth-editor in home folder:
    #!/bin/sh
    exec vim +$2 “$1”
    then launch sf and
    edit dup
    will launch vim with core.f and cursor at ‘dup’.

    (see manual 1.3.2 Configuring Your Editor p.13-14 for ideas regarding the editor set up)
    hth

    #12409

    Alaa Alawi
    Participant

    Hi Roelf,

    Thanks for the help.

    After losing some hair, I found the issue!

    I had my installation in /home/alaa/local/SwiftForth-3.7.1, and it seems that SwiftForth looks only for ‘SwiftForth’ folder and any other folder name (i.e. SwiftForth-3.7.1) will fail when trying to ‘edit’.

    For the editor setup, I went directly and edited the ‘editor’ script under SwiftForth/bin folder to be as short as:

    #!/bin/sh
    exec vim +$2 “$1”

    Other content had been deleted. I have my SwiftForth folder under git versioning in case I wanted to revert something back.

    Thanks again.

    Ala’a

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.