Created attachment 5651 patch Add an option to delete line / selection.
Created attachment 6766 patch for 0.4 I've updated patch for 0.4 version. Merge please
Even though I have commit rights now, I'd like to hear Matt's opinion about the code.
I haven't tested the functionality, but I'm not really fond of dropping an existing keybinding so it can be used for something else. It might be better to choose a new keybinding for this feature (ex. `<Ctrl><Shift>del`), or at least to give an alternative one to the detach tab feature. Also the wording is a bit confusing, it sounds like it would delete the current line or whatever is selected, but it seems to delete entire lines that have any amount of them selected. Maybe if it was just called "Delete Line(s)"?
Speaking about kb shortcuts: on the other hand detaching tab with keyboard is rarely used functionality. If you detach it you are likely to do it with mouse to place the window in desirable place. Ctrl+D shortcut is popular across Text editors: gedit, Eclipse and located near other popular shortcuts.
What about Ctrl + Shift + D? Most users are used to Ctrl + D, but some other editors use more awkward shortcuts, e.g. IntelliJ uses Ctrl + Y, Notepad++ uses Ctrl + L, Atom uses Ctrl + Shift + K... But I wonder if someday when we add a shortcut to Duplicate Line/Selection, what would that be? Ctrl + Alt + D? Regarding the wording, I don't know, using (s) to pluralize complicates some translations. GEdit calls this "Delete current line", Atom calls "Delete Line", Notepad++(Scintilla) calls "SCI_LINEDELETE" but they all delete all selected lines. Maybe Delete Line/Selection?
(In reply to André Miranda from comment #5) > Regarding the wording, I don't know, using (s) to pluralize complicates some > translations. GEdit calls this "Delete current line", Atom calls "Delete > Line", Notepad++(Scintilla) calls "SCI_LINEDELETE" but they all delete all > selected lines. Maybe Delete Line/Selection? Mostly I meant because it doesn't delete the selection (like Delete key does), it deletes all lines on which a selection exists, which can be more than what was selected, for example: Line| 1 Here Line 2 Here Line 3 |Here If the | shows the selection start/end, "delete selection" sounds like it would leave "LineHere", but it really deletes all 3 lines.
(In reply to Yan Pas from comment #4) > Speaking about kb shortcuts: on the other hand detaching tab with keyboard > is rarely used functionality. If you detach it you are likely to do it with > mouse to place the window in desirable place. Ctrl+D shortcut is popular > across Text editors: gedit, Eclipse and located near other popular shortcuts. I agree Ctrl+D is wasted on detaching tabs, what I meant was I just don't like breaking the ability to do it by a keybinding for people who do use it. At least if it's just changed to something else, they can still use the new binding. Geany uses Ctrl+k for "delete current line(s)", and Ctrl+d for "duplicate line or selection", as another data point. I'm rather indifferent on which actual binding gets used though. In a perfect world we would have a GUI like Geany has to allow easy re-binding of keys.
Users already may edit kb shortcuts (http://docs.xfce.org/faq). The problem is that only a few people know about this feature :)
Basically we have to choose one of the options: 1. Use Ctrl+D for "Delete current line(s)" and use another shortcut for Detach Tabs(Ctrl+Alt+T). 2. Choose another shortcut for "Delete current line(s)", e.g. Ctrl + K. I'd go for option 1, IMHO deleting lines is more used than detaching tabs(I didn't know there's a shortcut for it). In any case, if the user really needs the old shortcut they can do that enabling the option mentioned by Yan Pas, but I'm not sure that works for GTK 3. Also I agree with the naming "Delete current line(s)" and I hope the translators are able to handle the pluralization as this is not the first time we use the "(s)".
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/mousepad/-/issues/13. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev