Am 23.03.15 um 08:53 schrieb Bonnedav:
> On Sunday, March 22, 2015 at 10:33:08 AM UTC-6, Christian Gollwitzer wrote:
>> On Unix, typically the environment variable EDITOR or VISUAL is
>> set. If so, invoke that tool. If nothing is set, invoke vi. If that does
>> not work, write an error.
>>
>
> How do i do it on windows?
>
Do you insist, that the editor itself also does not open a GUI window?
32 bit Windows comes with a console editor, which you get by invoking
"edit". Just try it on the command line first to see it. However, 64 bit
versions of Windows do not ship this tool, as Windows generally expects
for user interaction that you show a GUI window. You have several
options, you can run the application linked to .txt files. This is done,
for instance, by "start something.txt", usually you invoke "cmd /c start
something.txt". Or you can run Notepad, which is guaranteed to exist,
but is a very basic and limited editor. The problem is to decide when
the user has closed the application. start runs the app in the
background. If you exec Notepad directly, you probably can wait until it
terminates.
Christian