Skip to content

Restoring open tabs between xed sessions #226

Open

Description

@Amandaville

Is there any way to restore open tabs between xed sessions? I keep 8 to 10 documents open in tabs for reference and updates through the day, and I have to reopen each of them on every restart. An option or a plugin to do this would be extremely useful.

Activity

  1. stefanoful commented on May 17, 2018

    @stefanoful

    HI,
    I would also like to keep the files open, even those NOT SAVED ...

  2. jpcusumano commented on Jul 15, 2018

    @jpcusumano

    Agreed. Remembering tabs is the only major thing missing from xed right now, at least given how I use it, which is mostly for sysadmin stuff. It's nice having the most commonly needed system files pop up by default every time I start geany. Something similar under xed would be awesome. I'm using version 1.8.2 under Mint 19.

  3. FatBirdie commented on Jan 17, 2020

    @FatBirdie

    How is this coming along?

  4. smokielad commented on Jan 17, 2020

    @smokielad

    I need this so much :-)

  5. FredGandt commented on Jan 19, 2020

    @FredGandt

    I was also frustrated to find that my opened files were not remembered by xed, and found myself here as I searched for an answer. I look forward to xed having this functionality as standard, but in the meantime, I thought a not horrible workaround might prove helpful to others finding their way here as I did.

    1. Create a .sh file ("edit.sh" for example) in the directory containing the files you wish to remember as a session. You can put the .sh file somewhere else, but it's simpler this way IMO
    2. Open the file in a text editor e.g. xed
    3. Add #!/bin/bash on the first line
    4. Add xed path/to/file.ext another/path/to/file2.ext file3.ext etc. on the next line
    5. Save the .sh file
    6. Check the file's properties>permissions>allow-executing-file-as-program
    7. Double click the .sh file and choose "Run"

    The space separated named files (appropriate encoding required for file names) will be opened in xed, in the tabbed order listed in the command; for example:

    xed index.php styles.css functions.js utils/more-functions.js will open xed with 4 tabs containing "index.php", "styles.css" and "functions.js" from the directory containing the .sh file, and "more-functions.js" from the "utils" subdirectory, in that order.

    A slightly more sophisticated solution that works when run as or from a symlink:

    Should still be placed in the directory containing the files to open. Easier to edit.

    #!/bin/bash
    
    # List files, with relative paths, to open
    files_to_open=(
    	file1.php
    	file2.js
    	subdir/file.php
    	sub/subdir/file.js
    )
    
    # Establish the real path to this script (in case its run from a symlink)
    my_real_path=$( realpath $0 )
    
    # Establish the real home of this script (in case its run from a symlink)
    my_real_home=$( dirname $my_real_path )
    
    # Create an array to populate with the files_to_open with their absolute path prepended
    # and populate it with this file (so the file that opened the others is also opened)
    files_with_paths=( $my_real_path )
    
    # For each file to open, prepend the absolute path to it and add it to files_with_paths
    for f in ${files_to_open[@]}; do
    	files_with_paths+=( ${my_real_home}/$f )
    done
    
    # Command xed to open the files
    xed ${files_with_paths[@]}
  6. Fromax commented on Apr 1, 2020

    @Fromax

    Could this be done with a plugin?

  7. dhrn commented on May 12, 2020

    @dhrn

    any update on this guys?

    Thanks

  8. icarter09 commented on May 13, 2020

    @icarter09
    Member

    @dhrn I kinda got sidetrack with life and other Mint things, but focused back now on getting this functionality implemented.

  9. dmitry commented on Jun 10, 2020

    @dmitry

    Dozen of times I lost information from xed, because xed killed for some reason or power cutoff (I don't have ground power at the moment in the house I live; so UPS doesn't help in such situations).

  10. FredGandt commented on Jun 10, 2020

    @FredGandt

    @dmitry The loss of changes made to files, due to power cut or crashes, is not the subject of this issue, which is about xed remembering which files were open when we closed xed, so the next time we open it, those files are automatically opened where we left off. I think it would significantly confused this issue, if we begin adding requirements for auto-saves and crash (for whatever reason) rescue, and you might be better served to either find a more suitable current issue, or create one.

  11. MMalakhov commented on Sep 23, 2020

    @MMalakhov

    So it's been 2 years, and there is no such basic feature like restore the last session. Amazing support!

  12. Amandaville commented on Sep 24, 2020

    @Amandaville
    Author

    I gave up on waiting and moved on to Featherpad when I switched to xfce, and I couldn't be happier. Featherpad always reopens with the same documents that we're open last time.

  13. izmogikan commented on Dec 4, 2020

    @izmogikan

    It's a nightmare without "Restoring open tabs" and "navigation between tabs" features.

  14. 15 remaining items

  15. Ben-Fenner commented on Jun 27, 2022

    @Ben-Fenner

    Oh wow! Thank you @tudo75. I am going to try this right away and report back!

  16. Ben-Fenner commented on Jun 27, 2022

    @Ben-Fenner

    @tudo75 I think you've answered the requests of everyone posting in this thread. You've done it! :D

    I was able to install the plugin, enable it, and mostly things work great. I do have a couple items of feedback. Would you like those here, or as new issues in the plugin repo?

  17. tudo75 commented on Jun 27, 2022

    @tudo75

    @Ben-Fenner as issue. I've few time to work on this so better to have things in the right place and don't waste time searching all around

  18. m3tabar0n commented on Dec 17, 2023

    @m3tabar0n

    Hi,
    is there any progress on this issue?
    The plugin from @tudo75 didn't work for me (xed v3.4.3).

  19. Ben-Fenner commented on Dec 17, 2023

    @Ben-Fenner

    @m3tabar0n I am using xed v3.4.3 as well, and Tudo's plugin linked above still works perfectly for me. Are you sure you have it installed properly, and enabled?

  20. m3tabar0n commented on Jan 18, 2024

    @m3tabar0n

    @Ben-Fenner Sorry, I am unable to reproduce atm as I uninstalled the Plugin and moved to VSCodium in the meantime.

  21. u2n commented on Jan 18, 2024

    @u2n

    Guess I'm not understanding why the @tudo75 plugin hasn't been incorporated into the main branch and this issue closed.

    Can it be that a pull request is needed?

    Not being unappreciative here; many thanks to all who contribute. It's just that when the work has been done, why not use it?

  22. becker44a commented on Apr 12, 2024

    @becker44a

    Installed and enabled successfully in Xed 3.2.2 on Mint 20.3, Xed 3.4.5 on Mint 21.3, Xed 3.4.3 on LMDE6. HUGE thanks for this work. I like to use several different editors, both GUI and CLI, and Xed was dropping off my list due to the lack of this feature. Using it daily again. Also agree this work should be merged into Xed for simple access for everyone !

  23. VedatDurmaz commented on Aug 1, 2024

    @VedatDurmaz

    Many thanks for adding this feature! But is there an essential reason why it couldn't be cherry-picked to version 3.4.3 on Mint 21.2 which based on a much more recent Ubuntu (22.4) version than Mint 20.3 (Ubuntu 20.4)?

  24. atheist1917 commented on Oct 13, 2024

    @atheist1917

    Six years passed since the issue was opened, and developers still don't give a damn about implementing super easy plugin - remember what files were opened at the moment app was closed and reopen them when app is started.
    Current version is Xed 3.6.6

  25. dwbapst commented on Mar 16, 2025

    @dwbapst

    I just want to throw my hat in to say this feature request is for an extremely valuable attribute, and that @tudo75's port of the gedit plugin to xed works perfectly for me on Mint 22.1 Cinnamon. Thanks Tudo!

  26. aliasfoxkde commented on May 5, 2025

    @aliasfoxkde

    I just followed @tudo75 comment and it worked for me. For some reason I got some warning after enabling the Plugin the first launch, but after closing again and re-opening, it worked. Does seem like a bit to of prerequisites to install for the the same behavior you get in Ubuntu by default. But I'm not knocking the solution, glad it worked! Thanks!

  27. ol-liu commented on Aug 7, 2025

    @ol-liu

    Is it possible to make this a standard plugin in xed?
    This function is very necessary for xed. I use ArchLinux+Cinnamon.

  28. filippologli commented on Apr 26, 2026

    @filippologli

    Thanks so much @tudo75, that's exactly what I'd been searching for. Your deb works fine on LM 22.2.

  29. KETGIT commented on Nov 5, 2026

    @KETGIT

    The elegance of xed is it's memory efficiency. Adding python scripting causes extra overhead.
    So instead I created a small bash script opening recent files from ~/.local/share/recently-used.xbel by xed.
    Usage:

    rxed

    The repository: https://github.com/KETGIT/rxed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions