Skip to content

Instantly share code, notes, and snippets.

@Takazudo
Forked from edom18/css3-property-duplicate
Created February 24, 2012 12:10

Revisions

  1. Takazudo revised this gist Feb 24, 2012. 1 changed file with 3 additions and 4 deletions.
    7 changes: 3 additions & 4 deletions css3-property-duplicate
    Original file line number Diff line number Diff line change
    @@ -9,9 +9,8 @@ function! CSS3PropertyDuplicate()
    let ms = ind[1] . "-ms-" . ind[2]
    let o = ind[1] . "-o-" . ind[2]

    let @@ = webkit . moz . ms . o
    normal ""P
    let @m = webkit . moz . ms . o
    normal "mP

    let @@ = reg_save
    endfunction
    nnoremap ,3 :<C-u>call CSS3PropertyDuplicate()<CR>
    nnoremap ,3 :<C-u>call CSS3PropertyDuplicate()<CR>
  2. @edom18 edom18 revised this gist May 15, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion css3-property-duplicate
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ function! CSS3PropertyDuplicate()
    let o = ind[1] . "-o-" . ind[2]

    let @@ = webkit . moz . ms . o
    normal ""p
    normal ""P

    let @@ = reg_save
    endfunction
  3. @edom18 edom18 revised this gist May 15, 2011. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion css3-property-duplicate
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    function! CSS3PropertyDuplicate()
    let reg_save = @@

    "silent normal ^v$hy
    silent normal Y
    let css3 = @@
    let ind = matchlist(css3, '\v(\s*)(.*)')
  4. @edom18 edom18 revised this gist May 15, 2011. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion css3-property-duplicate
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,7 @@ function! CSS3PropertyDuplicate()
    let o = ind[1] . "-o-" . ind[2]

    let @@ = webkit . moz . ms . o
    normal p
    normal ""p

    let @@ = reg_save
    endfunction
  5. @edom18 edom18 revised this gist May 15, 2011. 1 changed file with 8 additions and 6 deletions.
    14 changes: 8 additions & 6 deletions css3-property-duplicate
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,18 @@
    function! CSS3PropertyDuplicate()
    let reg_save = @@

    silent normal ^v$hy
    "silent normal ^v$hy
    silent normal Y
    let css3 = @@
    let webkit = "-webkit-" . css3 . "\n"
    let moz = "-moz-" . css3 . "\n"
    let ms = "-ms-" . css3 . "\n"
    let o = "-o-" . css3 . "\n"
    let ind = matchlist(css3, '\v(\s*)(.*)')
    let webkit = ind[1] . "-webkit-" . ind[2]
    let moz = ind[1] . "-moz-" . ind[2]
    let ms = ind[1] . "-ms-" . ind[2]
    let o = ind[1] . "-o-" . ind[2]

    let @@ = webkit . moz . ms . o
    normal p

    let @@ = reg_save
    endfunction
    nnoremap ,d :<C-u>call CSS3PropertyDuplicate()<CR>
    nnoremap ,3 :<C-u>call CSS3PropertyDuplicate()<CR>
  6. @edom18 edom18 created this gist May 15, 2011.
    16 changes: 16 additions & 0 deletions css3-property-duplicate
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    function! CSS3PropertyDuplicate()
    let reg_save = @@

    silent normal ^v$hy
    let css3 = @@
    let webkit = "-webkit-" . css3 . "\n"
    let moz = "-moz-" . css3 . "\n"
    let ms = "-ms-" . css3 . "\n"
    let o = "-o-" . css3 . "\n"

    let @@ = webkit . moz . ms . o
    normal p

    let @@ = reg_save
    endfunction
    nnoremap ,d :<C-u>call CSS3PropertyDuplicate()<CR>