I've the file, like:
name = foo
# unknown number of lines ...
features_exclude[rules_config][] = rule1
features_exclude[rules_config][] = rule2
features_exclude[rules_config][] = rule3
features_exclude[rules_config][] = rule4
and I'd like to run :/_exclude/s///
command on it and repeat it one more time (@:
).
I've tried things suggested in here, however it doesn't work.
So when using @:
to repeat the last command-line change, it gives me the error:
E30: No previous command line
So it seems it doesn't recognise what was the previous command line.
Here is example:
$ ex '+:/_exclude/s///p' '+@:' -scwq -V1 foo.txt
"foo.txt"
"foo.txt" 10 lines, 375 characters
search hit BOTTOM, continuing at TOP
features[rules_config][] = rule1
Error detected while processing command line:
E30: No previous command line
"foo.txt"
"foo.txt" 10 lines, 367 characters written
Why is that? Are there any other reliable ways of repeating the last Ex command?