Last active
December 24, 2015 23:19
-
-
Save steadystatic/6879676 to your computer and use it in GitHub Desktop.
Vim macro idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /media-external search for media external item | |
| 6w go 6 words ahead for the id | |
| vt""ay yank the id to reference into the 'a' register | |
| ctrl-w l switch to other xml pane | |
| :0 go to the top | |
| :/ctrl-r a paste the media overlay id we need to search for from 'a' register | |
| *****IF FAILS GO TO LAST LINE IN MACRO AND REPEAT****** | |
| bhvT,"by select the words before between the commas to grab the description and yank it into the 'b' register | |
| ctrl-w h switch to overlay xml pane | |
| /overlay find the set property overlay field | |
| 4wvt]"cy paste the overlay id into the 'c' register | |
| /ctrl-r c land on the first instance of the overlay id | |
| /textDefault | |
| 4wi ctrl-r b paste the description in register 'b' to the textDefault field | |
| /labelDefault | |
| 4wi ctrl-r b paste the description in register 'b' to the labelDefault field | |
| /altTextDefault | |
| 4wi ctrl-r b paste the description in register 'b' to the altTextDefault field | |
| 3j move just past the media-external xml block so we can search the next one |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment