adsr / mle

flexible terminal-based text editor (C)
Apache License 2.0
827 stars 53 forks source link

How do I join lines? #36

Closed hovsater closed 4 years ago

hovsater commented 4 years ago

Is it possible to join lines, if so, how? If not, is it within the scope of mle or more in the realm of scriptable using Lua?

adsr commented 4 years ago

Do you mean to go from

one two three

to

one two three

? If so I would probably select the lines and M-e xargs or M-e tr -d '\n'. If you do that a lot, you can make a key binding for it.

mle -N -K 'custom_kmap,,1' -k 'cmd_shell,F8,xargs' -n custom_kmap ...

If it's a common editor feature we can also add a built-in for it very easily.

hovsater commented 4 years ago

Yeah, I've been using the M-e xargs myself, The keybinding would suffice for now. Joining lines are fairly common but at the same time I don't think it makes sense to extend the mle core just because I think so.

Let's close this for now! 🙂