I am trying to write my first vim macro. The goal is to map a line containing a keyword to google doc string format.
So the input is:
'keyword' : value,
and desired output would be:
keyword (value) :
So I assume the easiest way would be to define a macro.
In console mode I used wdwwD
from the beginning of the line to successfully delete everything around my keyword.
But binding it to a macro (with additionally adding j0
to get a new line) yields the following output : keyword' : value
I've also tried f'r f'Dj0
but it resulted in the same output.
So it seems like I am doing something wrong but repeating the sequence yields my desired output, but not binding it to a macro even though thats what it supposed to do, right?
My example is
Battery_config = {
'charging_efficiency' : 0.8,
'discharging_efficiency' : 0.99,
'hourly_self_discharge': 0.005
}