This is super easy in kakoune, requires few keystrokes and no customization, and can be done in any kind of buffer.