Advertisement
Guest User

Untitled

a guest
Jan 9th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VIM 1.16 KB | None | 0 0
  1. syntax enable
  2. filetype plugin on
  3. set t_Co=256
  4.  
  5. set backspace=indent,eol,start
  6. set whichwrap+=<,>,[,]        " cursor left and right move to next/prev lines
  7. set linebreak
  8. set ttyfast
  9.  
  10. set path +=**
  11. set wildmenu
  12.  
  13. "set background=light
  14. set background=dark
  15. colorscheme primary
  16.  
  17. "colorscheme 256_noir
  18. set number
  19. set noswapfile
  20. set whichwrap+=<,>
  21. set nocompatible
  22. set backspace=indent,eol,start
  23. set tabstop=2
  24. set shiftwidth=2
  25. set expandtab
  26. set autoindent
  27. set smartindent
  28. set cindent  
  29. set wrap
  30.  
  31. function RepasteCase(s, ...)
  32.   let dash = substitute(a:s, '_', '-', 'ge')
  33.   let camel = substitute(a:s, '_\(\l\)', '\u\1', 'ge')
  34.   for i in a:000
  35.     let sdash = substitute(i, '_', '-', 'ge')
  36.     let scamel = substitute(i, '_\(\l\)', '\u\1', 'ge')
  37.     let sub = substitute(getreg('"'), a:s, i, 'ge')
  38.     let dashsub = substitute(sub, dash, sdash, 'ge')
  39.     let camelsub = substitute(dashsub, camel, scamel, 'ge')
  40.     put = camelsub
  41.   endfor
  42. endfunction
  43.  
  44. function Repaste(s, ...)
  45.   for i in a:000
  46.     put = substitute(@0, a:s, i, 'g')
  47.   endfor
  48. endfunction
  49.  
  50. command -nargs=* RP call Repaste(<f-args>)
  51. command -nargs=* RPc call RepasteCase(<f-args>)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement