Page 1 of 1
cm_EditNewFile 1: create a new file, but do not open the editor
Posted: 2023-05-04, 07:25 UTC
by Stefan2
Hello Christian,
I want to remind on this often need feature.
Additionally to
cm_EditNewFile >> Create+Open new text file
I would like to suggest a parameter
cm_EditNewFile 1 >> Create new text file, but do not open the editor
Re: cm_EditNewFile 1: create a new file, but do not open the editor
Posted: 2023-05-04, 09:13 UTC
by Hacker
Support++.
Roman
Re: cm_EditNewFile 1: create a new file, but do not open the editor
Posted: 2023-05-10, 16:07 UTC
by Stefan2
This is implemented now, many thanks to Mr. Ghisler.
https://www.ghisler.com/history1100.txt
10.05.23 Release Total Commander 11.00 beta 2
07.05.23 Added: cm_EditNewFile with parameter 1 now creates a new file without opening the editor.
Uploads new file to ftp or file system plugin if it doesn't already exist there (32/64)
Testes on Win11 and it works for me from TC command line and also from an button.
SYNTAX
-- "cm_EditNewFile" is the internal command to open an existing file in the configured editor (F4), and first create the file, if not already present.
-- Use "cm_EditNewFile 1" to create a new text file, but don't open it instantly in the configured editor.
Most useful for myself too, for to create new text files just as notice, now w/o the need to close the disturbing popping up editor.
ATTENTION
2ghisler(Author)
"cm_EditNewFile 1" used on an existing file will open the dialog ,
pre-filled with the name of the existing file as usual,
but does nothing after clicking on the [OK]-button.
It works as designed. But maybe you want to ignore the "1"-parameter if used on an already existing file?
That would prevent the need to create two buttons // use two commands for to work with the files.
Re: cm_EditNewFile 1: create a new file, but do not open the editor
Posted: 2023-05-10, 16:25 UTC
by beb
Don't they just look like the sister threads by now?:
viewtopic.php?t=78852 [here]
viewtopic.php?t=78958 [there]
Re: cm_EditNewFile 1: create a new file, but do not open the editor
Posted: 2023-05-10, 17:02 UTC
by Stefan2
No, only because in both its about the same internal base command.
[here] >> suggestions for >>>>>> "cm_EditNewFile 1"
[there] >> another suggestions > "cm_EditNewFile file1.txt|file2.txt|file3.txt"
Re: cm_EditNewFile 1: create a new file, but do not open the editor
Posted: 2023-05-10, 17:21 UTC
by beb
2Stefan2
Roger.
Re: cm_EditNewFile 1: create a new file, but do not open the editor
Posted: 2023-06-25, 09:02 UTC
by Stefan2
2ghisler(Author)
can this please become adjusted?
"cm_EditNewFile 1"
> if the entered filename doesn't exist yet, created it but don't open the editor (due to the '1') >> implemented
> if the entered // pre-filled-suggested filename already exist, just open it for editing >> this doesn't work right now
Thank you