Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@Martian2020: man ascii will show that C-j is newline and C-m is CR (return). These are basic well-known, well-defined characters that should never be remapped.
@Martian2020: C-j is bound to the Readline function accept-line as is C-m. You can find aacept-line in man bash. By the way, C-j is newline and C-m is carriage return.
@MatthaeusGaiusCaesar: That may be true for some, but the OP specified not to touch single spaces and my answer clearly states this condition. To convert all spaces to tabs I think it's as simple as removing the space after the plus sign in my commands.