Skip to content

Instantly share code, notes, and snippets.

@moriiimo
Created April 16, 2013 11:24
Show Gist options
  • Save moriiimo/5395204 to your computer and use it in GitHub Desktop.
Save moriiimo/5395204 to your computer and use it in GitHub Desktop.
vim : 文字列置換
以下の文字を
Mon
Tue
Wed
Thu
Fri
Sat
Sun
以下のようにしなさい(Vimで!)
var hoge = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
1):1,6s/\n/", "/g
2):s/\(.*\)/var hoge = ["\1"]/g
@hisasann
Copy link

せっ、正規表現、、、

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment