Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I very much miss Notepad++ for making quick notes, and then being able to close the window without being asked whether I'd like to save the document. This, and auto-save (so not losing documents if you forget to save) is one of the main reasons I replaced Notepad with ++.

Rather quickly, I found that I had to completely remove Notepad so muscle memory would stop guiding me to it. Good times (and sad ones; I lost a lot of lecture notes) -- nevertheless, Notepad++ is an excellent piece of software.

I'm curious if the same "write and close the window" workflow is achievable with Kate, as I haven't been able to find the option; and, of course, the obvious question: what about this one?



Occasionally, someone will submit their new text editor to Hacker News and the first thing I do is check if it quietly saves sessions upon closure.

It's amazing how many people don't bother implementing this indispensable feature.


> It's amazing how many people don't bother implementing this indispensable feature.

BBEdit is almost bizarrely bulletproof in this regard. I never, in a decade, lost a single note. To me, this is probably the most overlooked and important feature in a text editor.

I switched to Plasma/Linux a few years ago and have since learned that Kate is not as robust.

Must try Notepad Next.


It's always amazing how someone's "indispensible feature" is something that someone else couldn't care less about.

I don't even really use the concept of open files. I mostly switch files using a fuzzy finder that lists files in the git repo. So what files are "open" in my session is irrelevant to my workflow. (Unless they have unsaved changes of course, but I basically always just use "Save All" so even that state is minimal.)


I'm very glad others have come to expect this feature, too; I assumed it was another of my weird, niche workflows :-)


Kate can restore sessions, not sure it can auto save on close. Ctrl+L saves all but Kate will ask for still unnamed files.


I haven't been able to get it to act like Notepad++, wherein it doesn't ask you to save on quit. Perhaps there's a configuration option I've missed?


I'll look for it but I'm not sure I've ever seen it despite having seen the settings countless times. If it doesn't exist it could be an easy and useful contribution :-)


So, we actually have "Enable auto save (for local files only)" section, and two options:

- an "Auto save document when the active document is losing focus"

- Auto save interval

So I guess we are already covered :-)


Vim had this feature for years. But it took until I tested lazyvim (neovim distribution of plugins) that makes session restore so easily accessible, that I now rely on it.


> being able to close the window without being asked whether I'd like to save the document

Notepad on Windows now has this behavior. Finally.

After having used it for more than three decades, it now has the one feature that prevented me from using it to take scratch notes. It will autosave without prompting on close.

And it has a dark mode, so now I use it daily.


I don't think the core/default Kate editor does the same "write and close the window" like Notepad++. Kate does have pretty cool options for session handling - which helps keep files open that you had been working on, etc...which i understand is not the same thing. But, now that you asked, i wonder if there is a plugin or extenson for Kate that might provide such a feature? I myself am a fan of Notepad++, and install it on any corporate-issued Windows machine that i am given by dayjobs...but at home, its all linux all the time, so Kate comes closest for me. I did see someone else mentioned that there is something named NotepadQQ or something which is like Notepad++ but works cross-platform...so that sounds interesting if true. And, i wonder if NotepaddQQ has that auto "write and close the window" workflow?


Kate does support it. There is a checkbox somewhere in the settings to enable exactly this behavior. I use it together with sessions.


Confirmed; just as you noted this functionality from Notepad++ exists in Kate!!! I guess i now am fully going to dive in to Kate even for Windows (nothing against Notepad++, but no need for it now)! Thanks!


Nice! I will have to check that out. Thanks!


Notepad will now restore open files, like Notepad++ does. TextEdit on macOS does the same.


It has been a suggested/encouraged default behavior on the Mac for many years at this point.


It’s just yet another thing Apple gets right: why would the default be to NOT keep what you just put into the computer?


It seems to be the modern way, and normal on mobile apps, and I can't stand it. Why would I want the computer to save what I wrote without asking? I like being asked. I dislike computers trying to be clever.


This happened to me yesterday:

I had to complete a resiliency test on our infrastructure and submit it to auditors for compliance reasons. I ran the tests, got the results, and I have to put it into a report. The report is like 30 pages long or more, but very little changes between each test (we do them quarterly). So I only usually change a few tables with the new report results, and freeflow some commentary in the discussion section that is unique for that run, so that the auditor feels special.

Anyway, I open up the previous quarter's report. I edit a bunch of data, write a bunch of useless commentary and go to "Save As" with the Q1-2024 suffix, and I realize the Word document had been autosaving my work the whole time on top of the Q4-2023 report. Urgh, very annoying. I didn't save intentionally because I knew I would save a copy later.

I was able to restore the old version through revision history, but still annoying nonetheless.


I'm inclined to agree with Microsoft Word's autosave, here. If you are making edits to a file, the implication (which could be wrong) is you're intending to overwrite at the end. And indeed, autosave came around because way too many people were losing document modifications to freak power outages and computer crashes.

If the intent is to not overwrite an existing file, I personally learned to make a copy first either via Save As in the program or by copying in whatever file manager I'm using. That way I make my intention clear to both myself and the computer.

I've actually burned myself numerous times because occasionally I would forget to copy first, instinctively hit CTRL+S frequently because I hail from before autosaving became widespread, and then realize I just overwrote something I wanted to keep as-is.


As I read it, the GP complains about Word auto-saving on top of the OG document. I think intermediate changes should go to an auto-save buffer until you tell the editor to save over the top. For that reason I'm inclined to agree with the GP. Word's behaviour is wrong and the process you describe sounds like a workaround.


Office's auto save feature only works on OneDrive and SharePoint Online, which means every change is versioned. There is no 'overwriting' the OG document. The OP can go back in the history and recover it.


That's really annoying, but not quite the same as what Notepad++ (and presumably others) do.

Notepad++ just saves a cached version of the file without touching the original until you explicitly hit "Save". If you close the file in Notepad++ (not exit Notepad++, but tell Notepad++ to close the file thus deleting the cache), it will ask whether you want to save your work.


> why would the default be to NOT keep what you just put into the computer?

Because you didn't ask it to save and closed the app?


And if you misclick? Or there's a power outage? Or crash? Guardrails are nice and since I usually want to save what I've entered I appreciate it being the default behavior. Or in other words, I asked.

To address another commenter's point about word overwriting: auto saves should only go into a temp/separate file so as to never supersede manual saves.


I've been using Sublime Text to do this. I use VS Code/Neovim for my programming, but Sublime Text is still way too convenient as a notepad to keep around, one of the main reasons being this feature.


You probably already know this. VSCode has both autosave and hot exit features.

If you quit the application when hot exit is enabled, it will restore all windows the next time you start it.

I don't see any way to close individual windows without prompting but you can do command+w and then command+d to "Don't Save".


Oh yeah, VSCode's autosave has saved me hours in otherwise-lost code. I do make frequent use of its hot-exit functionality, too.

While that's great, I wish the same thing existed for a lightweight Notepad-esque app, too: I used ++ a lot for quickly jotting down information while it was being read to me (so, on the phone); having to start a full-blown IDE for this seems wasteful, and not the right tool for the job.

Perhaps the solution is just to leave VSCode open all the time, but that wouldn't work either: whenever I switch workspaces, I'm asked whether I'd like to save the unsaved files (so, just like Kate), and it can be quite resource intensive. Grr.


Not just the auto save, but that it is using GIT on the backend for the timeline. Such a helpful feature!


I never noticed this. I just hit Ctrl-S obsessively in every application. I heard that once upon a time, vanilla Notepad ignored Ctrl-S. Horror!


Fwiw, I do this in Obsidian (it just saves every keystroke), really enjoying it.


it's achievable with default notepad.exe in Win11.


Have you tried neovim? It just works and is blazing fast (respectively plain vim, if you don't need plugins)


Is anyone aware of an editor in Linux that has this behaviour?


Geany. Not sure if by default or of it needs to be turned on in the settings. And Geany can be anything from a simple text editor to a very nice IDE.


Modern gedit on gnome has it


Which version? Or what enables it?

Version 41 (the one bundled w/Ubuntu 22.04 LTS) does have this behaviour from Notepad++


Try CudaText.


Its a pain to install due to dependencies on libqt5pas1 (which doesn't work with the version provided on Ubuntu 22.04). I was able to install via snap but it takes way too long to start up (even vscode starts faster).


Oh, I've heard that snaps are terrible. I'm using flatpak on Fedora and Cuda is starting much faster than VSCode.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: