bugGNU nano - Bugs: bug #59048, [Wish] delete marked text when a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #59048: [Wish] delete marked text when a character is typed

Submitter:  Tiago Almeida <tjapro>
Submitted:  Tue 01 Sep 2020 10:08:48 AM UTC
   
 
Severity:  1 - Wish Status:  Wont Fix
Assigned to:  None Open/Closed:  Closed

Thu 03 Sep 2020 01:04:25 PM UTC, comment #4: 

Thank you @bens, and be calm. :-)
I appreciate your work!

Tiago Almeida <tjapro>
Thu 03 Sep 2020 12:44:58 PM UTC, comment #3: 

Another option?  ...  No.  If I do that, then I have no more argument against adding an overtype toggle (unbound by default).  I do not want to have an overtype mode ever.  And I do not want the typing of a character to delete anything ever.  If you want any of those things, use another editor.  I'm sure that Vim and Emacs can be configured to look and behave mostly like nano while retaining their far greater configurability.

However, if you want to locally modify your nano to delete marked text when typing anything, you can apply the attached patch.  (Note that undoing such an overtype goes in two steps: 1) remove the added character, 2) restore the deleted text.  Making that go in a single step would be hard.)  But beware: if I ever encounter such a nano in the wild, I will curse you.  :)

(file #49736)

Benno Schulenberg <bens>
Group administrator
Wed 02 Sep 2020 10:03:40 AM UTC, comment #2: 

Thanks @bens, I read the other issue.
I understand the phrase "Nano demands that the user is chirurgical about her operations: if she wants to delete something, she must give a deleting command" in an editor like nano.

But this can't be under a (of course, always deactivated by default) option?
In this way the user was the final and the only responsible of their edits and actions. And this won't affect others manner of working (like that one you have shown).

Tiago Almeida <tjapro>
Tue 01 Sep 2020 03:02:28 PM UTC, comment #1: 

In this case, nano will not adapt to what other editors do.  Typing any text should never result in the destruction of text -- if the user wants to remove text, they should be explicit and type a delete command first (^K, <Del>, <Bsp>...).  For the same reason, nano does not have an overtype mode.

This has been asked before (bug #57797) and been rejected before.

Benno Schulenberg <bens>
Group administrator
Tue 01 Sep 2020 10:08:48 AM UTC, original submission:  

This is a feature request for something that already occurs in others text editor and even in browsers textareas'.
When mark or select some text (long phrases or just a word) and begin typing, the marked text is removed in favour of the new text.
But in nano editor, this isn't the case: is needed to click in backspace and only after begin typing.
There is a small video attached for a better visualization ("zap" option ativated in nanorc).
Thanks!

Tiago Almeida <tjapro>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #49729:  example.webm added by tjapro (134KiB - video/webm - The example video.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by tjapro (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-09-16 bens Open/ClosedOpen Closed
    2020-09-03 bens Attached File- Added make-typing-a-character-delete-marked-text.patch, #49736
    2020-09-01 bens Severity3 - Normal 1 - Wish
        StatusNone Wont Fix
        Summary[Wish] Delete the marked text right after begin typing [Wish] delete marked text when a character is typed
    2020-09-01 tjapro Attached File- Added example.webm, #49729

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code