我有几行文本,都具有相同的结构,并且想在所有行上排列 2 个元素:
1257654 some text (which may be long) #Foo
1543098 some other text #Barbar
1238769 whatever #Baz
2456874 something else #Quux
我想获得:
#Foo some text (which may be long) 1257654
#Barbar some other text 1543098
#Baz whatever 1238769
#Quux something else 2456874
这就是我卡住的地方:
:%s/\(\d\{7\}\)\(#.\{-}\)/\2\1/
我哪里做错了 ?