Skip to content

Instantly share code, notes, and snippets.

@Takazudo
Forked from edom18/css3-property-duplicate
Created May 15, 2011 02:20
Show Gist options
  • Select an option

  • Save Takazudo/972833 to your computer and use it in GitHub Desktop.

Select an option

Save Takazudo/972833 to your computer and use it in GitHub Desktop.
CSSのプロパティを、ベンダープレフィクス付きで複製するスクリプト。(インデントも引き継ぐよう修正)
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment