Menu

#1528 Opening character with selection should enclose the selection

Initial
open
nobody
5
2024-11-04
2024-07-10
No

When typing an opening character when the editor have a selection, I would like so enclose the selection with the opening/closing characters instead of replacing the selection with the opening character.

This text is selected

Typing " will give this text "This text is selected"
Typing ( will give this text (This text is selected)

VS Code have this feature. And there the the original selection is retained.

Related

Feature Requests: #1529

Discussion

  • Neil Hodgson

    Neil Hodgson - 2024-07-10

    This is available from Komodo Edit as Edit | Preferences... | Editor | Smart Editing | Wrap selection with type delimiter. Its implementation (using Scintilla) is open source.

     
  • Thomas Linder Puls

    It would be simpler for everybody if the editor itself supported it. But I can look there and implement it in our surroundings.

     
  • Thomas Linder Puls

    Thank you for the reference.

    I think such a feature should be based on a setting of quote pairs. So that when typing something which it set as an open-quote for the current editor then the corresponding close-quote will be inserted at the other end of the selection. (It should become one undo-action). So if (is defined as an open quote with ) as the corresponding close-quote for the current editor and that editor has a selection and the use types ( then ) is also inserted as a closing (and the selection is retained).

    See also https://sourceforge.net/p/scintilla/feature-requests/1527/

     
  • Zufu Liu

    Zufu Liu - 2024-07-11
    • labels: --> scintilla, brace
     
  • Notepad-- / subtwo

    I don't think is a goold idea。Don't compare it to VSCode, the complexity and vastness of VSCode make many people dislike it.If this feature is forced in this way, it will actually bring some difficulties to users who input pure text.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.