Guest User

Untitled

a guest
Jan 18th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. Move to 'L' (type 0fL) |L|inux Solaris Irix HP-UX
  2. "lye
  3. 'Linux' is now in the 'l' register.
  4. Move to 'S' (type fS) Linux |S|olaris Irix HP-UX
  5. "sde"lP Linux Linu|x| Irix HP-UX
  6. 'Solaris' is now in the 's' register.
  7. Move to 'I' (type fI) Linux Linux |I|rix HP-UX
  8. "ide"lP Linux Linux Linu|x| HP-UX
  9.  
  10. 0fLw2dwbyf<space>w2P
  11.  
  12. Move to L in Linux
  13. ye # Yank to end of word.
  14. w # Move to next word.
  15. <C>ve # Highlight Solaris.
  16. "0p # Paste Linux, Solaris ends up in unnamed register and Linux in 0
  17. w # Move to next word.
  18. <C>ve # Mark next word. (Or anywhere else)
  19. "0p # Paste Linux.
  20.  
  21. yww<C>v2f 2p
  22. # Or
  23. yww<C>v2el2p
  24. yw # Yank Linux
  25. w # Move to S in Solaris
  26. <C>v2el # Enter visual mode, highlight two * end, and l to consume space.
  27. 2p # Paste Linux twice.
  28.  
  29. '<C>v2f ' # Alternative to <C>v2el
  30.  
  31. xnoremap p pgvy
Add Comment
Please, Sign In to add comment