Author Topic: Expected behavior for Vs+new ?  (Read 79 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2288
  • Hero Points: 197
  • Text
Expected behavior for Vs+new ?
« on: September 13, 2021, 07:26:51 pm »
When I create a new instance of Slickedit with "VS +new"

  • The new instance doesn't load a workspace or files by default. (Good!)
    Nice.  (+newi).

  • Running "VS filename.txt" from a CMD prompt opens the file in the most recent instance of slickedit. (BAD)

        Older versions of slick would always send to the first instance of slick.
        I'd prefer if "vs.exe" would interact with the 1st instance - or better still allow me to tell it which instance.
        Maybe even let me give an instance ID:
       
        vs                       # Creates Slickedit with some default ID
        vs -ID=Edit1             # Creates a new instance with id "Edit1"
        vs -ID=Edit1 file.txt    # Opens File.txt in 2nd instance
        vs -ID=default File2.txt # Opens File2.txt in 1st instance.


        Another possibility: Act like Chrome: The most recently used instance will get activated by a "vs.exe" invocation.

  • Settings changes between multiple instances appear to synchronize (one instance saves settings, and the other instances reload them). (Maybe)
    Nice, but: I'd like all the setting to sync except it would be good to have some visual distinction (different color scheme, different title bar, something!). Maybe add an instance ID to the title bar?

  • +new instances don't load all state:  For example, I have modified macros\TBFileList.e. "VS+new" instances do not have these changes. (BAD)
    Is there any way to make this work?

  • Documentation?
    I don't see anything in the documentation describing the behaviors of multiple instances.
    OIC: Sharing Your Configuration with Multiple Instances
    But, it doesn't say anything about VS invocations.

  • Clipboards
    The list of clipboards isn't shared between instances.

  • ISEC
    From Macros, is there any sort of Inter-SlickEdit-Communication?
    With user specified IDs (See #2), this could at least be done by running vs.exe


at5dapa1

  • Senior Community Member
  • Posts: 219
  • Hero Points: 20
Re: Expected behavior for Vs+new ?
« Reply #1 on: September 14, 2021, 06:45:28 am »
+1 for:
Quote
or better still allow me to tell it which instance.
It would be nice to have the option when SE is invoked with a file (or a macro which will open a file) and there are multiple instances, to popup a dialog and ask which instance should handle the request. I would be fine with an extra invocation param which will trigger this mechanism only on request (e.g. vs -query-instances file.txt and vs "-query-instances -#my_GoTo_macro file.txt|lineNr|colNr").

I addressed similar question long time ago "How to select correct instance of SlickEdit?"(https://community.slickedit.com/index.php/topic,15685.0.html) and got some hints about DDE from Graeme, however didn't have a chance to try...  :'(

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5957
  • Hero Points: 467
Re: Expected behavior for Vs+new ?
« Reply #2 on: Today at 03:59:11 pm »
2. Added support for "-sid <instance-id>" invocation option for beta 4

Here are some examples:

     # Invoke a new instance of SlickEdit. A unique numeric instance id >=1 is used.
     vs +new
     # Invoke a new instance of <productname/> with specific instance id "s1".
     vs +new -sid s1
     # Open file in instance "s1" or new instance "s1" of SlickEdit
     vs -sid s1 /home/username/file.txt
     # Open file in first (oldest instance).
     vs -sid 0 /home/username/file.txt
     # Open file in most recent (newest instance) or new instance of SlickEdit
     vs /home/username/file.txt
     # Open file, go to line 124 column 5, and search for word "command"
     # in most recent (newest instance) or new instance of SlickEdit
     vs /home/username/file.txt -#124 "-#goto-col 5" "-#/command"
     # Open file, go to start, perform case sensitive replace without prompting, and save and close file
     # in most recent (newest instance) or new instance of SlickEdit
     vs /home/username/file.txt -#top-of-buffer "-#c/wrd/word/e*" "-#file"

Not sure what "Most recent" and "first/oldest instance" should mean. Right now, it means instance creation time. Could be changed to mean date activated. Both have merit. Instance creation time is more predictable than activation time (the chrome way). Activation time will constantly change. Although, this means you could activate a specific instance to make it "most recent" and pass a file to it. Not going to implement both.

3. Instance ID in the title bar. Looking into this.

4. Plugins install/uninstall syncs. However, most macro dev changes (loading macros/editing forms) don't sync yet. See "help Limitations with sharing your configuration with multiple instances". If you edit your recorded macros (vusrmacs.e), they will be reloaded when you switch to another instance.

5. Docs will be improved for beta 4

6. Clipboards are not shared yet (stored in vrestore.slk - nothing from there synced). Would be nice to sync them. I think this is doable but a new mechanism outside of vrestore.slk would have to be implemented.

7. ISEC. There's no inter communication yet. For now, this is done by running vs (-#<command> is handy).
« Last Edit: Today at 04:58:15 pm by Clark »