Guest User

Untitled

a guest
Jun 13th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. SPAC SPAC - Specific-Purpose Committee Campaign Finance Report
  2. SPAC-SS SPAC-SS - Specific-Purpose Committee Special Session Report
  3. SPAC-T SPAC-T - PAC Special Pre-election (Telegram) Report of Contributions
  4.  
  5. 'SPAC' SPAC - Specific-Purpose Committee Campaign Finance Report
  6. 'SPAC-SS' SPAC-SS - Specific-Purpose Committee Special Session Report
  7. 'SPAC-T' SPAC-T - PAC Special Pre-election (Telegram) Report of Contributions
  8.  
  9. 'SPAC ' SPAC - Specific-Purpose Committee Campaign Finance Report
  10. 'SPAC-SS ' SPAC-SS - Specific-Purpose Committee Special Session Report
  11. 'SPAC-T ' SPAC-T - PAC Special Pre-election (Telegram) Report of Contributions
  12.  
  13. :'<,'>s/[^ ]+/''
  14.  
  15. '<,'> the range of lines you want to treat (you could use % is you want to change all the lines of the buffer, or use line numbers e.g. 1,10)
  16. s/ the substitution command
  17. [^ ]+ all the characters until the first white space
  18. /
  19. '' is what you matched before and it is surrounded by quotes.
  20.  
  21. qa0viWS'jq
  22.  
  23. qa record a macro in the register a
  24. 0 move to the beginning of the line
  25. viW visually select the word
  26. S' surround it with simple quotes
  27. j move one line down
  28. q stop recording
  29.  
  30. qaI'<Esc>Ea'jq
  31.  
  32. qa record the macro
  33. I' insert a quote at the beginning of the line
  34. <Esc> exist insert mode
  35. E go to the end of the first word
  36. a' insert a quote after the word
  37. j go down one line
  38. q stop recording
Add Comment
Please, Sign In to add comment