I just don't undstand the VIM help for pattern matching and substitution. I've tried.
I have many lines of code, like so:
G1 X139.164 Y115.348 E8.40357 ; perimeter
G1 X138.903 Y115.845 E8.57778 ; perimeter
G1 X136.919 Y119.355 E9.82896 ; perimeter
G1 X135.204 Y125.148 F250
G1 X133.565 Y124.281 E11.75686 F250
I want to remove uppercase E and everything following it on each line - or truncate each line, beginning with the E.
Things I've tried:
:%s/E\>//g
:1,$/E\>\.//
:%s/E\>\zs.*//
Please help.
//gat the end. Also, you can just do:%instead of:1,%– DJMcMayhem Jun 14 '17 at 20:20$either, since*matches as much as possible (though it doesn't hurt). – Antony Jun 14 '17 at 21:35