I like to use VIM to quickly generate snip of codes from text. Now I have case I think I may need to use VIM advanced find & replacement to convert text to a snip of codes. The following text is a simplified example:
value1
value2
...
valueN
I use VIM vertical block to insert prefix string, or use find & replace (:%s/^/public const string /”) to achieve the same result like this:
public const string value1
public const string value2
...
public const string valueN
Now I would like to complete the above text to codes like this:
public const string value1 = "value1";
public const string value2 = "value2";
...
public const string valueN = "valueN";
Note: the value1..valueN are simplified ones, they are actually in various length. Not sure if there is any way to use VIM advanced find & replace to add the suffix string with the last word as reference?
From your initial list:
Should do it.