edit icon indicating copy to clipboard operation
edit copied to clipboard

Add support for notepad++

Open mainrs opened this issue 4 years ago • 5 comments

I've opened an issue over at their repository, so once that gets added we could add back support for notepad++. https://github.com/notepad-plus-plus/notepad-plus-plus/issues/9680

mainrs avatar Mar 21 '21 13:03 mainrs

At that linked issue:

One can use a feature of the operating system for this, e.g. from cmd.exe, start /wait notepad++.exe

I wonder if this works with all the other editors on Windows. Perhaps the -w flags aren't necessary at all and we can just start every editor that way.

twilligon avatar Mar 21 '21 20:03 twilligon

At least on Windows it should work. Although I wonder: wouldn't that mean that a terminal window pops up? Which wouldn't be the case for GUI apps with a dedicated flag?

mainrs avatar Mar 21 '21 20:03 mainrs

I don't think a terminal window necessarily pops up. IIRC there is a flag to prevent that, but I'm not aware of the details of how Rust's process::Command invokes CreateProcess.

I don't have a Windows machine readily available for testing at the moment, but if someone wants to test e.g. EDITOR="start /wait code" cargo run they can check if this would work.

twilligon avatar Mar 21 '21 20:03 twilligon

At that linked issue:

One can use a feature of the operating system for this, e.g. from cmd.exe, start /wait notepad++.exe

I wonder if this works with all the other editors on Windows. Perhaps the -w flags aren't necessary at all and we can just start every editor that way.

This doesn't work on notepad++. I attempted start /wait it in many different configurations, it still doesn't block and immediately returns.

nikitalita avatar Apr 12 '21 07:04 nikitalita

OK, good to know all that effort finding program-specific "wait for close" flags isn't for nought. :laughing:

twilligon avatar Apr 12 '21 07:04 twilligon