-
-
Save Takazudo/1900591 to your computer and use it in GitHub Desktop.
CSSのプロパティを、ベンダープレフィクス付きで複製するスクリプト。(インデントも引き継ぐよう修正)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! CSS3PropertyDuplicate() | |
let reg_save = @@ | |
silent normal Y | |
let css3 = @@ | |
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 @m = webkit . moz . ms . o | |
normal "mP | |
endfunction | |
nnoremap ,3 :<C-u>call CSS3PropertyDuplicate()<CR> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment