WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: small change request for editor  (Read 2294 times)

Offline florian

  • Full Member
  • ***
  • Posts: 116
    • Home Page
small change request for editor
« 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')


Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: small change request for editor
« Reply #1 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.
Many people see what is. Some people see what can be, and make a difference.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: small change request for editor
« Reply #2 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.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: small change request for editor
« Reply #3 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: small change request for editor
« Reply #4 on: December 11, 2010, 11:23:44 AM »
So perhaps the removal of the popup would be sufficient.

Offline florian

  • Full Member
  • ***
  • Posts: 116
    • Home Page
Re: small change request for editor
« Reply #5 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")

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: small change request for editor
« Reply #6 on: December 11, 2010, 02:08:09 PM »
OK. Done.  It is in 3.4rc2 ;D
« Last Edit: December 12, 2010, 10:33:47 AM by roberts »
10+ Years Contributing to Linux Open Source Projects.