Ability to join and split lines with keyboard shortcuts
A feature I very frequently used in some other text editors, for general text manipulation/cleanup purposes (whatever the file type and syntax, without those editors being IDEs), is the ability to quickly combine/join lines with the Ctrl+J
shortcut, or split a line into multiple lines (at the current cursor/column's position) with Ctrl+Shift+J
.
Why is this useful?
When joining lines for example, this lets you reassemble a whole paragraph in one operation, instead of needing to put the text cursor at the end of each line, hit the Delete
key, reposition yourself at the end of the next line, and repeat that tedious process endlessly. With the "join lines" shortcut approach, you don't need your cursor to be at a very precise position on a line/paragraph to be able to accomplish your goal.
It's a great time saver in all sorts of day-to-day situations; for example, cleaning up text that was copied from a PDF or plaintext email (or code comment!), for use in some other rich text format app (like a word processor, a web app, a chat app, a clean markdown file, etc.) that doesn't handle render paragraphs with arbitrary linebreaks well. I also use it quite often when drafting articles/blog posts. I'm sure there are other uses for writers as well.
Scope and side-effects
I don't necessarily need a GUI menu entry for this (though it might make sense as a right-click contextual menu entry?), I'm happy if this is even just an easter-egg "only documented in the keyboard shortcuts window" feature.
The feature has no negative side-effects that I'm aware of.
Code reference
I'm filing this in the hope that someone might find this relevant and interesting enough to implement in gnome-text-editor.
If this can serve as inspiration, I found this piece of code that is the plugin that provided that functionality in Gedit. Maybe the existence of that code could make this ticket newcomer-friendly?