两行代码格式化为一行,快捷键

如何将两行代码变成一行,如下: if test.valid? 快捷键变成 if test.valid?,

找到了,vim Shift-j

M-^ (delete-indentation)

M-^ runs the command delete-indentation (found in global-map), which is an interactive compiled Lisp function in `simple.el’.

It is bound to M-^.

(delete-indentation &optional ARG)

Join this line to previous and fix up whitespace at join. If there is a fill prefix, delete it from the beginning of this line. With argument, join this line to following line.

非常感谢,请问平时遇到问题去哪里查找文档?

SPC h SPC Spacemacs自带的文档 C-h emacs 的在线帮助功能,你不用它上帝都会谴责你的。 以及我觉得你可能需要先学vim。

我想到了一个新的问题,看这里: 合并上下两行的时候,如果是中文,怎样避免增加的空格?