How can I recursively use Global in VIM?

Is there something wrong with ": g-2-g / 3 /" or is global recursion simply missing? I can not understand the cause of the error:

E147: Failed to execute: global recursive

How can I get a recursive global search in VIM?

[Neil's original sentence with the operator \ | ]

g/1.*2\|2.*1/

The disadvantage is that combinations expand with n numbers. For three numbers, the number of combinations is 3! (= 6) that

g/1.*2.*3\|2.*1.*3\|3.*1.*2\|1.*3.*2\|2.*3.*1\|3.*2.*1/ 

For n numbers, the number of combinations is n !.

[Solution with operator \ &]

Brian Carper and Neil Butterworth figured out a solution. Thanks so much for them!
g/.*1\&.*2\&.*3/

This is for the whole line:

g/.*1\&.*2\&.*3\&.*/
+3
source share
1 answer

: , - "\ &" - "":

g/.*1\&.*2\&.*3/

(. ):

/1\&2/ , " position". /.*1\&.*2/ ,

+3

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


All Articles