Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: florian on December 11, 2010, 05:38:19 AM

Title: small change request for editor
Post by: florian on December 11, 2010, 05:38:19 AM
I recently upgraded my EeePC netbook to TC 3.3. Great release, Thanks! I was delighted to see a basic built-in editor as for some reasons I never got intimate with vi. I often use nano but editor is still very useful, for example when I boot with "base norestore" to test something as in this configuration extensions aren't loaded.

I have one small change request for editor. If I invoke editor with a filename that doesn't exist, a popup message with a message that file isn't found gets displayed. Instead if filename doesn't exist I would like the file to be created and then loaded in the editor.

Rationale for the change:
1) this is how most editors works in unix
2) some programs actually rely on this behaviour to integrate editors (if one defines the environment variable EDITOR or VISUAL to 'editor')

Title: Re: small change request for editor
Post by: Guy on December 11, 2010, 09:28:53 AM
What about when someone makes a typing mistake? This would create a file they don't want.

If this idea is implemented, what about a message saying "file isn't found, do you want to create this file?" Then have the option to choose yes or no.
Title: Re: small change request for editor
Post by: gerald_clark on December 11, 2010, 10:57:38 AM
Vi does not create the file until you save.
If you find yourself unexpectedly editing an empty buffer, quitting will not create the file.
Title: Re: small change request for editor
Post by: tinypoodle on December 11, 2010, 11:17:33 AM
Vi does not create the file until you save.

As with the majority of editors IME, be it under unix or other platforms.
Title: Re: small change request for editor
Post by: gerald_clark on December 11, 2010, 11:23:44 AM
So perhaps the removal of the popup would be sufficient.
Title: Re: small change request for editor
Post by: florian on December 11, 2010, 11:34:14 AM
ok, you're right. creation of file not requested. but yes, removal of popup and being able to "save" (not just "save as")
Title: Re: small change request for editor
Post by: roberts on December 11, 2010, 02:08:09 PM
OK. Done.  It is in 3.4rc2 ;D