Giter Site home page Giter Site logo

Comments (4)

alankilborn avatar alankilborn commented on May 31, 2024 2

Your B can be achieved with a PythonScript:

if notepad.getCurrentFilename().startswith('new '):
    editor.setSavePoint()
    notepad.close()

from notepad-plus-plus.

Gilgamech avatar Gilgamech commented on May 31, 2024 1

I use the AutoSave plugin to achieve something similar:

  • Configure AutoSave plugin to save to a specific folder. Feel free to enable security measures on that folder.
  • Create new tabs for ephemeral uses.
    • Open as many as you need.
    • Let them keep their default names "New 1", "New 2"..."New N" etc.
  • Let AutoSave plugin save these to the specific folder with the default names.
    • If there's a system issue, or if you need to reboot for Windows Updates etc, the data is already on disk and the file can just be reopened.
  • When you don't need a file or data anymore, close the tab.
    • If the universe changes and you suddenly need the data again, just un-close the tab Ctrl+Shift+T.
    • Long-term, the file will eventually probably get overwritten.
      • The first "New 1" will get overwritten probably 80% to 90% as much as "New 2", which will probably be 80% to 90% more often than "New 3" etc.

If you don't open many of these at the same time, you won't really need to garbage collect. My use patterns only create 4-5 of these files.

from notepad-plus-plus.

jurijsk avatar jurijsk commented on May 31, 2024

@alankilborn Thank your for the hint. I will try that and see if it sticks.

For those who want to try this.

  1. You have to install PythonScript script plugin. It is available from Plugins Admin. Not sure how it will behave if Python is not yet installed on your computer, see doc for that.
  2. Create the script with the code provided by alankilborn. Now you can invoke the script from Plugins menu.
  3. If you want to assign the shortcut to the script, first add your newly created script to Menu Items in PythonScript configuration, restart notepad++ and then go to Settings -> Shortcut Mapper... to finish the process.

from notepad-plus-plus.

alankilborn avatar alankilborn commented on May 31, 2024

For those who want to try this.

Yes...sorry... I should have provided this link: https://community.notepad-plus-plus.org/topic/23039/faq-desk-how-to-install-and-run-a-script-in-pythonscript

from notepad-plus-plus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.