LoginSignup
4
4

More than 5 years have passed since last update.

VimGolfに挑戦 - No.2 ~ Words in parens

Last updated at Posted at 2014-04-24

VimGolfとは、Vimのキーストロークの少なさを競えるサイトです。
http://vimgolf.com/challenges/5192f96ad8df110002000002

たとえば、初期状態でこうなっている文字列を

one two
three   

Vimで以下のように編集する場合のキーストロークの少なさを競い合います。

(one) (two)
(three)  

まだまだ、わたしのVim知識では、スコア21が限界。。。(おい..またか・泣)

:%s/\(\w*\)/(\1)/g<CR>ZZ

最少のキーストロークが14みたいだけど、どーやってやんのさ?
上級Vimmerの皆様、お知恵をお貸しください!!

4
4
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4