How to quickly concatenate two lines in Wim?

Main operation: suppose I have two lines of python codes in the opening buffer

datacontour(set_color=set_color, figout="test", figext="pdf") 

the second line is indented by 8 spaces, because it is a continuation of the first line, now I want to combine both lines together, excluding spaces between the two

  datacontour(set_color=set_color, figout="test", figext="pdf") 

What is the easiest way to do this? or what shortcut should i define in the vimrc file? Thanks.

+6
source share
3 answers

Press J from the line 'dataContour ...'

The next line will be merged with the current line.

+11
source

Enter "J" (capital J) when your cursor is on the first of two lines.

+2
source

Type J in the first line. hope this helps

+2
source

Source: https://habr.com/ru/post/905383/


All Articles