I want to have the following contents in my file
#define BIT_MASK_1 (1 << 0)
#define BIT_MASK_2 (1 << 1)
#define BIT_MASK_3 (1 << 2)
#define BIT_MASK_4 (1 << 3)
so I write one line like this :
#define BIT_MASK_1 (1 << 0)
, and then type Y3p
, V3j
, so I got four same lines which are selected, and after that I wanted to use the command below to turn the text into the content I want
:'<,'>s/BIT_MASK_/zs/d*/ze//=line(".") - line("'<") + 1
:'<,'>s//zs/d*/ze)$//=line(".")-line("'<")
but I got the E488: Trailing characters
error, what did I do wrong?